This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch PR libstdc++/51135]: Fix [4.7 Regression] SIGSEGV during exception cleanup on win32


Hi,
On Mon, 12 Dec 2011, Kai Tietz wrote:

Index: gcc/libstdc++-v3/libsupc++/cxxabi.h
===================================================================
--- gcc.orig/libstdc++-v3/libsupc++/cxxabi.h
+++ gcc/libstdc++-v3/libsupc++/cxxabi.h
@@ -51,6 +51,10 @@
#include <bits/cxxabi_tweaks.h>
#include <bits/cxxabi_forced.h>

+#ifndef _GLIBCXX_USE_THISCALL_ON_DTOR
+typedef void (*__cxa_dtor_type) (void *);
+#endif
+

This changes the type from a function with "C" linkage to one with "C++" linkage, is that on purpose?
Humm, thanks, I didn't really spend time on what was going on *below* the define, only to the right way to implement the mingw specific bits. I guess moving the #ifndef a few lines down, close to the other typedef should be the safe thing to do. That also requires adjustment in the config files, the typedef there must be also wrapped in #ifdef __cplusplus, etc.

Please do the Change Kai.
There is a type __cxa_cdtor_type a couple lines below, which also seems used for destructors, but that one doesn't get __thiscall, that's confusing (but then there's probably a reason why it wasn't used in __cxa_throw).
No idea if it's right for mingw.

Paolo.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]