public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/51135] New: SIGSEGV during exception cleanup on win32
@ 2011-11-15  5:21 gurnec-bugz at gis dot net
  2011-12-05 14:14 ` [Bug libstdc++/51135] [4.7 Regression] " rguenth at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: gurnec-bugz at gis dot net @ 2011-11-15  5:21 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51135

             Bug #: 51135
           Summary: SIGSEGV during exception cleanup on win32
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: gurnec-bugz@gis.net


It looks like __thiscall is now the default calling convention for member
functions (where possible) for win32 targets. This seems to have broken
exception cleanup. 

This seg faults when executed (and compiled by mingw-32):

===============
struct except {
  virtual ~except() {}
};

int main() {
  try {
    throw except();
  } catch(except) {
  }
}
===============

The seg fault occurs after the catch block is exited, and except::~except() is
called by the runtime. I think __gxx_exception_cleanup (in
libstdc++-v3/libsupc++/eh_throw.cc) is still trying to call except::~except()
using the old calling convention, resulting in a seg fault on any access to
'this'.

-Chris


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2011-12-16 18:47 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-15  5:21 [Bug libstdc++/51135] New: SIGSEGV during exception cleanup on win32 gurnec-bugz at gis dot net
2011-12-05 14:14 ` [Bug libstdc++/51135] [4.7 Regression] " rguenth at gcc dot gnu.org
2011-12-05 14:53 ` paolo.carlini at oracle dot com
2011-12-05 15:11 ` davek at gcc dot gnu.org
2011-12-05 15:18 ` ktietz at gcc dot gnu.org
2011-12-06 14:05 ` [Bug target/51135] " rguenth at gcc dot gnu.org
2011-12-12 13:31 ` ktietz at gcc dot gnu.org
2011-12-12 13:39 ` ktietz at gcc dot gnu.org
2011-12-12 17:35 ` paolo at gcc dot gnu.org
2011-12-12 18:10 ` paolo.carlini at oracle dot com
2011-12-16 18:47 ` ktietz at gcc dot gnu.org
2011-12-16 18:58 ` ktietz at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).