[Bug target/62231] [4.8/4.9 regression] Exception handling broken on powerpc-e500v2-linux-gnuspe

2015-05-19 Thread andri.yngvason at marel dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62231

Andri Yngvason  changed:

   What|Removed |Added

 CC||andri.yngvason at marel dot com

--- Comment #14 from Andri Yngvason  ---
I have the same problem with 5.1 on a 603e, even though the patches from
comment #4 seem to have been applied. I get the same stack trace as seen in
comment #3.

It doesn't matter whether I compile with --with-cpu=603e or without.


[Bug target/62231] [4.8/4.9 regression] Exception handling broken on powerpc-e500v2-linux-gnuspe

2015-05-20 Thread andri.yngvason at marel dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62231

--- Comment #16 from Andri Yngvason  ---
Sorry, Joseph, I wasn't sure if this issue was fixed or not since the status is
"NEW". I'll report a new issue.


[Bug libgcc/66212] New: Exception handling broken on powerpc

2015-05-20 Thread andri.yngvason at marel dot com
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 
#include 
#include 

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  0x1c28 in foobar() ()
#6  0x1cac 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.


[Bug libgcc/66212] Exception handling broken on powerpc

2015-05-20 Thread andri.yngvason at marel dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66212

--- Comment #1 from Andri Yngvason  ---
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 (0xb742)
/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 root397872 May 20 10:11
/lib/glibc2.21/libgcc_s.so.1
lrwxrwxrwx1 root root10 May 20 10:57 /lib/ld-linux.so.2 ->
ld-2.21.so
lrwxrwxrwx1 root root12 May 20 10:57 /lib/libc.so.6 ->
libc-2.21.so
lrwxrwxrwx1 root root12 May 20 10:57 /lib/libm.so.6 ->
libm-2.21.so
lrwxrwxrwx1 root root19 May 20 10:57 /lib/libstdc++.so.6 ->
libstdc++.so.6.0.21

I'll try 4.9...


[Bug libgcc/66212] Exception handling broken on powerpc

2015-05-20 Thread andri.yngvason at marel dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66212

--- Comment #3 from Andri Yngvason  ---
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!


[Bug libgcc/66212] Exception handling broken on powerpc

2015-05-21 Thread andri.yngvason at marel dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66212

Andri Yngvason  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |INVALID

--- Comment #4 from Andri Yngvason  ---
I downloaded everything again and started from scratch. I've no idea what was
wrong but now the problem is gone. Mea culpa.