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
* [Bug libgcc/66212] Exception handling broken on powerpc 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 ` andri.yngvason at marel dot com 2015-05-20 20:05 ` wilson at gcc dot gnu.org ` (2 subsequent siblings) 3 siblings, 0 replies; 5+ messages in thread From: andri.yngvason at marel dot com @ 2015-05-20 11:22 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66212 --- Comment #1 from Andri Yngvason <andri.yngvason at marel dot com> --- I've now compiled the same toolchain for i686 and I have the same issue there, so I assume that I'm doing something wrong. It's hard to pin down what I'm doing wrong though. Everything seems to be linked correctly: # ldd stdexcept linux-gate.so.1 (0xb77ad000) libstdc++.so.6 => /lib/libstdc++.so.6 (0xb7633000) libm.so.6 => /lib/libm.so.6 (0xb75ea000) libgcc_s.so.1 => /lib/glibc2.21/libgcc_s.so.1 (0xb75ce000) libc.so.6 => /lib/libc.so.6 (0xb7420000) /lib/ld-linux.so.2 (0xb77ae000) # ls -l /lib/libstdc++.so.6 /lib/libm.so.6 /lib/libc.so.6 /lib/glibc2.21/libgcc_s.so.1 /lib/ld-linux.so.2 -rw-r--r-- 1 root root 397872 May 20 10:11 /lib/glibc2.21/libgcc_s.so.1 lrwxrwxrwx 1 root root 10 May 20 10:57 /lib/ld-linux.so.2 -> ld-2.21.so lrwxrwxrwx 1 root root 12 May 20 10:57 /lib/libc.so.6 -> libc-2.21.so lrwxrwxrwx 1 root root 12 May 20 10:57 /lib/libm.so.6 -> libm-2.21.so lrwxrwxrwx 1 root root 19 May 20 10:57 /lib/libstdc++.so.6 -> libstdc++.so.6.0.21 I'll try 4.9... ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libgcc/66212] Exception handling broken on powerpc 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 3 siblings, 0 replies; 5+ messages in thread From: wilson at gcc dot gnu.org @ 2015-05-20 20:05 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66212 --- Comment #2 from Jim Wilson <wilson at gcc dot gnu.org> --- libgcc should be built with debug info by default, but the one in /lib is probably stripped. Try setting LD_LIBRARY_PATH to point at the gcc-5.1 libraries that you built, instead of using the default ones provided by the OS in /lib. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libgcc/66212] Exception handling broken on powerpc 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 3 siblings, 0 replies; 5+ messages in thread From: andri.yngvason at marel dot com @ 2015-05-20 22:33 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66212 --- Comment #3 from Andri Yngvason <andri.yngvason at marel dot com> --- This is the libgcc that I built. I put it there. However, it is entirely within the realm of possibility that it may have been stripped on it's way there via dpkg. I'll try copying it there directly. Thanks! ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libgcc/66212] Exception handling broken on powerpc 2015-05-20 10:30 [Bug libgcc/66212] New: Exception handling broken on powerpc andri.yngvason at marel dot com ` (2 preceding siblings ...) 2015-05-20 22:33 ` andri.yngvason at marel dot com @ 2015-05-21 15:03 ` andri.yngvason at marel dot com 3 siblings, 0 replies; 5+ messages in thread From: andri.yngvason at marel dot com @ 2015-05-21 15:03 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66212 Andri Yngvason <andri.yngvason at marel dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #4 from Andri Yngvason <andri.yngvason at marel dot com> --- I downloaded everything again and started from scratch. I've no idea what was wrong but now the problem is gone. Mea culpa. ^ 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).