Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 179554 - [bad-code/4.2] sigc++-2.0 based code with -fstrict-aliasing crashes with compiled gcc 4.2
Summary: [bad-code/4.2] sigc++-2.0 based code with -fstrict-aliasing crashes with comp...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL: http://gcc.gnu.org/PR30252
Whiteboard:
Keywords:
: 181124 (view as bug list)
Depends on:
Blocks: gcc-4.2
  Show dependency tree
 
Reported: 2007-05-23 17:53 UTC by Peter Alfredsen (RETIRED)
Modified: 2007-07-18 09:42 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
41_all_gcc42-PR30252.patch (41_all_gcc42-PR30252.patch,3.61 KB, patch)
2007-06-20 00:10 UTC, Ryan Hill (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Alfredsen (RETIRED) gentoo-dev 2007-05-23 17:53:39 UTC
This has been reported upstream, see URL in bug description. This may be the same bug that's mentioned here:
[4.2 regression] miscompilation of sigc++-2.0 based code with -fstrict-aliasing
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30252

Having recompiled my system with the new gcc-4.2.0 and glibc-2.6, I tried to run rtorrent. It segfaults:
pa@loki ~/session $ rtorrent
Caught Segmentation fault, dumping stack:
0 rtorrent [0x8058ff1]
1 rtorrent [0x806d6d9]
2 [0xffffe420]
3 [0x82e938e]
4 rtorrent [0x805877d]
5 /lib/libc.so.6(__libc_start_main+0xe0) [0xb7a159d0]
6 rtorrent(_ZN7torrent18set_max_open_filesEj+0x89) [0x8051b01]
Aborted

I have, for now, recompiled just rtorrent and libtorrent with gcc-4.1.2, which works fine. 

Reproducible: Always

Steps to Reproduce:
Comment 1 Timothy Redaelli (RETIRED) gentoo-dev 2007-05-23 18:48:52 UTC
Can you try to use -fno-strict-aliasing in CFLAGS and see if it works?
Comment 2 Peter Alfredsen (RETIRED) gentoo-dev 2007-05-23 20:45:37 UTC
I just recompiled libtorrent and rtorrent with these parameters:
CFLAGS="-Os -march=athlon-xp -pipe -ggdb3 -fno-strict-aliasing" CXXFLAGS="-Os -march=athlon-xp -pipe -ggdb3 -fno-strict-aliasing" emerge -1 libtorrent rtorrent
So far, it seems to work fine.
Comment 3 SpanKY gentoo-dev 2007-06-18 04:26:28 UTC
*** Bug 181124 has been marked as a duplicate of this bug. ***
Comment 4 SpanKY gentoo-dev 2007-06-18 04:29:12 UTC
rtorrent report: http://libtorrent.rakshasa.no/ticket/926

but in reality, a gcc-4.2 bug
Comment 5 Ryan Hill (RETIRED) gentoo-dev 2007-06-20 00:10:37 UTC
Created attachment 122558 [details, diff]
41_all_gcc42-PR30252.patch

here's the patch.  this should apply after 40_all_gcc42-PR30052.patch.
Comment 6 Peter Alfredsen (RETIRED) gentoo-dev 2007-06-21 16:44:37 UTC
(In reply to comment #5)
> Created an attachment (id=122558) [edit]
> 41_all_gcc42-PR30252.patch
> 
> here's the patch.  this should apply after 40_all_gcc42-PR30052.patch.
> 

I've just applied this to my local gcc-4.2.0 and gcc builds and rtorrent runs. (I changed the libtorrent and rtorrent ebuilds to not append-flags fno-strict-aliasing).

Comment 7 Raul Metsma 2007-06-21 18:40:09 UTC
Built just new gcc with 1.2 patchet and this patch but still inkscape crashes
Comment 8 SpanKY gentoo-dev 2007-06-22 01:59:23 UTC
the fix from upstream has been put into the 1.3 patchset
Comment 9 Raul Metsma 2007-06-23 11:33:10 UTC
Inkscape is still no good with 1.3 patchet
Comment 10 SpanKY gentoo-dev 2007-06-23 14:33:08 UTC
what exactly did you re-compile ?  rebuilding just inkscape i dont think would be enough
Comment 11 Raul Metsma 2007-06-23 16:55:10 UTC
Rebuild gcc-4.2.0 and after that inkscape
Comment 12 SpanKY gentoo-dev 2007-06-23 17:03:41 UTC
which isnt sufficient i dont think ... rebuild all the packages related to inkscape, first starting with dev-libs/libsigc++