public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgcc/66212] New: Exception handling broken on powerpc
@ 2015-05-20 10:30 andri.yngvason at marel dot com
  2015-05-20 11:22 ` [Bug libgcc/66212] " andri.yngvason at marel dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: andri.yngvason at marel dot com @ 2015-05-20 10:30 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66212

            Bug ID: 66212
           Summary: Exception handling broken on powerpc
           Product: gcc
           Version: 5.1.0
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: libgcc
          Assignee: unassigned at gcc dot gnu.org
          Reporter: andri.yngvason at marel dot com
  Target Milestone: ---

All exceptions cause the running process to be aborted.

The following program is aborted when trying to unwind the stack:
#include <exception>
#include <stdexcept>
#include <iostream>

using std::cout;
using std::endl;

void foobar()
{
    cout << "..." << endl;
    throw std::runtime_error("Whoohoo");
    cout << "Wtf?" << endl;
}

int main(int, char**)
{
    cout << "Throwing standard exception..." << endl;

    try {
        foobar();
    } catch(std::exception& e) {
        cout << "Caught: " << e.what() << endl;
    }

    cout << "Done!" << endl;

    return 0;
}

Backtrace:
#0  0x0fbff76c in raise () from /lib/libc.so.6
#1  0x0fc010cc in abort () from /lib/libc.so.6
#2  0x0fd5fc1c in uw_init_context_1 () from /lib/glibc2.21/libgcc_s.so.1
#3  0x0fd60408 in _Unwind_RaiseException () from /lib/glibc2.21/libgcc_s.so.1
#4  0x0fed10ac in __cxa_throw () at
../../../../gcc-5.1.0/libstdc++-v3/libsupc++/eh_throw.cc:82
#5  0x10000c28 in foobar() ()
#6  0x10000cac in main ()

$ powerpc-marel-linux-gnu-g++ -v 
Using built-in specs.
COLLECT_GCC=powerpc-marel-linux-gnu-g++
COLLECT_LTO_WRAPPER=/opt/plutotoolchain/libexec/gcc/powerpc-marel-linux-gnu/5.1.0/lto-wrapper
Target: powerpc-marel-linux-gnu
Configured with: ../gcc-5.1.0/configure --prefix=/opt/plutotoolchain
--target=powerpc-marel-linux-gnu --enable-languages=c,c++
--enable-threads=posix --enable-shared --disable-multilib --enable-__cxa_atexit
--disable-sjlj-exceptions --disable-nls --enable-symvers=gnu --enable-c99
--enable-long-long --enable-profile --with-tune=e300c3 --disable-altivec
Thread model: posix
gcc version 5.1.0 (GCC) 

I tried to compile libgcc with debug symbols so that I could see which
assertion fails, but my attempts had no effect. I'd be happy to learn how to
get those debug symbols in there.


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

end of thread, other threads:[~2015-05-21 15:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-20 10:30 [Bug libgcc/66212] New: Exception handling broken on powerpc andri.yngvason at marel dot com
2015-05-20 11:22 ` [Bug libgcc/66212] " andri.yngvason at marel dot com
2015-05-20 20:05 ` wilson at gcc dot gnu.org
2015-05-20 22:33 ` andri.yngvason at marel dot com
2015-05-21 15:03 ` andri.yngvason at marel 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).