public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/26397]  New: Program crashes when rethrowing exception
@ 2006-02-21 15:55 michael dot klein at fazi dot de
  2006-02-21 15:57 ` [Bug target/26397] " michael dot klein at fazi dot de
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: michael dot klein at fazi dot de @ 2006-02-21 15:55 UTC (permalink / raw)
  To: gcc-bugs

The program below crashes with illegal instruction when rethrowing the
previously caught exception.

GCC version:

$ powerpc-ibm-aix5.2.0.0-gcc-4.0.2 -v
Using built-in specs.
Target: powerpc-ibm-aix5.2.0.0
Configured with: ../gcc-4.0.2/configure --disable-nls --enable-threads=posix
--enable-languages=c,c++ --disable-shared
--enable-version-specific-runtime-libs 
Thread model: aix
gcc version 4.0.2

$ powerpc-ibm-aix5.2.0.0-gcc-4.0.2 exctest.cpp -lstdc++ -o exctest


#include <string>

struct FzException
{
  const char *what()
  {
    mWhat = std::string("a") + std::string("b");
    return mWhat.c_str();
  }

  std::string mWhat;
};


int main(int, char **argv)
{
  try
  {
    try
    {
      throw FzException();
    }
    catch(FzException & e)
    {
      e.what();
      throw;
    }
  }
  catch(...)
  {
    exit(1);
  }
}


-- 
           Summary: Program crashes when rethrowing exception
           Product: gcc
           Version: 4.0.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: michael dot klein at fazi dot de
 GCC build triplet: powerpc-ibm-aix5.2.0.0
  GCC host triplet: powerpc-ibm-aix5.2.0.0
GCC target triplet: powerpc-ibm-aix5.2.0.0


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


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

end of thread, other threads:[~2009-06-10 11:46 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-21 15:55 [Bug c++/26397] New: Program crashes when rethrowing exception michael dot klein at fazi dot de
2006-02-21 15:57 ` [Bug target/26397] " michael dot klein at fazi dot de
2006-02-21 16:05 ` pinskia at gcc dot gnu dot org
2006-02-21 16:21 ` michael dot klein at fazi dot de
2006-04-14 17:52 ` dje at gcc dot gnu dot org
2006-04-24  9:26 ` michael dot klein at fazi dot de
2006-06-07 23:14 ` mark dot woollard at macrovision dot com
2006-07-07 18:26 ` stuart dot downing at sungard dot com
2006-07-07 18:28 ` stuart dot downing at sungard dot com
2008-10-15 12:30 ` dje at gcc dot gnu dot org
2008-10-15 13:45 ` stuart dot downing at sungard dot com
2008-10-15 15:36 ` dje at gcc dot gnu dot org
2008-11-06 15:35 ` dje at gcc dot gnu dot org
2009-06-10 11:46 ` jwakely dot gcc at gmail dot com

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).