Bug 214223

Summary: valgrind SIGSEGV on startup gcc 4.4.1 ppc32 (G4) Ubuntu 9.10
Product: [Developer tools] valgrind Reporter: did447
Component: generalAssignee: Julian Seward <jseward>
Status: RESOLVED DUPLICATE    
Severity: crash CC: albrecht.dress, bart.vanassche+kde, doomster
Priority: NOR    
Version: 3.5.0   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description did447 2009-11-12 05:35:43 UTC
Hi,
Linux 2.6.31.4

PowerPC gcc -O2 doesn't like _builtin_longjmp in m_machine.c signal handler, it SIGSEGV after catching SIGILL. (machine F 1 V 1 FX 0 GX 1)

Adding '#pragma GCC optimize ("-O0")' in m_machine.c and recompiling the packet seems to work, I don't use valgrind with multi-threads programs though.


Gcc -v output:

Using built-in specs.
Target: powerpc-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.4.1-4ubuntu8' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --disable-softfloat --enable-secureplt --enable-targets=powerpc-linux,powerpc64-linux --with-cpu=default32 --disable-werror --with-long-double-128 --enable-checking=release --build=powerpc-linux-gnu --host=powerpc-linux-gnu --target=powerpc-linux-gnu
Thread model: posix
gcc version 4.4.1 (Ubuntu 4.4.1-4ubuntu8)
Comment 1 Bart Van Assche 2009-11-12 18:41:20 UTC
Is that the gcc compiler included in Ubuntu Karmic Koala ?
Comment 2 did447 2009-11-12 19:33:04 UTC
(In reply to comment #1)
> Is that the gcc compiler included in Ubuntu Karmic Koala ?

Yes it is, Ubuntu compiler and Ubuntu valgrind package.
Comment 3 Bart Van Assche 2009-11-12 20:30:23 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > Is that the gcc compiler included in Ubuntu Karmic Koala ?
> 
> Yes it is, Ubuntu compiler and Ubuntu valgrind package.

Did I understand correctly that the Valgrind package included in the ppc edition of Ubuntu Karmic Koala is broken ? If so, has this issue already been reported to Ubuntu via https://launchpad.net/ ? If not, can you please do this and post the Launchpad id here ?
Comment 4 did447 2009-11-12 23:16:13 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > (In reply to comment #1)
> > > Is that the gcc compiler included in Ubuntu Karmic Koala ?
> > 
> > Yes it is, Ubuntu compiler and Ubuntu valgrind package.
> 
> Did I understand correctly that the Valgrind package included in the ppc
> edition of Ubuntu Karmic Koala is broken ? If so, has this issue already been

If it throws  an exception in m_machine.c machine_get_hwcaps() then yes it's broken at least it's what I'm seeing here.
 
> reported to Ubuntu via https://launchpad.net/ ? If not, can you please do this
> and post the Launchpad id here ?
I don't know how to use launchpad

Didier
Comment 5 Ulrich Eckhardt 2010-11-14 14:24:47 UTC
I can confirm this bug, and also that the workaround works.

OS Debian testing on PowerPC
valgrind 3.6.0
gcc 4.4.5
Comment 6 albrecht.dress 2011-05-15 15:52:32 UTC
The same bug is still present with Ubuntu 11.04 on PPC32:
- machine: PowerPC G4 "Silver"
- cpu PPC 7450/800 MHz
- compiler gcc-4.5.2 (4.5.2-8ubuntu4)
- libc glibc-2.13-1 (2.13-0ubuntu13)

The optimisation fix seems to work, i.e. 'valgrind ls' doesn't crash.
Comment 7 albrecht.dress 2011-05-15 15:59:03 UTC
Ummm, I forgot to mention that Ubuntu 10.4 comes with Valgrind 3.6.1.  I also opened an Ubuntu bug report <https://bugs.launchpad.net/ubuntu/+source/valgrind/+bug/783020>.
Comment 8 Julian Seward 2011-05-16 12:55:49 UTC
This has been fixed in the trunk now (bug 259977).  I was not
aware that 259977 duplicates this bug.  Closing as dup of 259977.

*** This bug has been marked as a duplicate of bug 259977 ***