Summary: | net-fs/samba: test for -errwarn=%all flag sometimes triggers crashes when building w/gcc since the flag gets pass through to the linker | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Sergey S. Starikoff <Ikonta> |
Component: | [OLD] Core system | Assignee: | Gentoo's SAMBA Team <samba> |
Status: | RESOLVED WONTFIX | ||
Severity: | normal | CC: | alex_y_xu, toolchain |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=560614 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
SIGSEGV confest core dump
SIGABRT samba conftest core dump conftest.c |
Description
Sergey S. Starikoff
2014-03-16 07:15:19 UTC
Created attachment 372792 [details]
SIGABRT samba conftest core dump
Comment on attachment 372790 [details]
SIGSEGV confest core dump
Please attach gdb backtraces, not coredump files.
Comment on attachment 372792 [details]
SIGABRT samba conftest core dump
Same.
Please attach gdb backtraces ("bt full"). Core dumps are useless without the binary and all libraries and all symbols. (In reply to Alex Xu (Hello71) from comment #4) > Please attach gdb backtraces ("bt full"). > It would be nice, but I can't guess how to get them: which binary burns this process, and how much times it's called? Could you reproduce my check? 1. Enable writing core dump files. 2. Not to search for them set up core name: /etc/sysctl.conf kernel.core_pattern = /tmp/cores/core_%e-%s.%p (also providing process name, kill sinal and pid number in core filename) 3. local.d script to create temporary directory for cores: /etc/local.d/cores.start #!/bin/sh mkdir -m 0777 /tmp/cores And check the known issued procedure # ebuild samba-3.6.23.ebuild configure for first SIGSEGV core dump Today's update showed issue present for =gnome-base/dconf-0.24.0 Created attachment 412020 [details]
conftest.c
Issue still present for =net-fs/samba-3.6.25 built with =sys-devel/gcc-4.8.5.
Attaching source of issued test.
Program built with system defaults:
$ x86_64-pc-linux-gnu-gcc -o conftest -march=native -O2 -pipe -errwarn=%all -Diniparser_getstr\(d,i\)=iniparser_getstring\(d,i,NULL\) -Wl,-O1 -Wl,--as-needed conftest.c
produces core.
Decreasing optimization to -O1, i.e compilling with:
$ x86_64-pc-linux-gnu-gcc -o conftest -march=native -O1 -pipe -errwarn=%all -Diniparser_getstr\(d,i\)=iniparser_getstring\(d,i,NULL\) -Wl,-O1 -Wl,--as-needed conftest.c
Or removing -errwarn option with -O2:
$ x86_64-pc-linux-gnu-gcc -o conftest -march=native -O2 -pipe -Diniparser_getstr\(d,i\)=iniparser_getstring\(d,i,NULL\) -Wl,-O1 -Wl,--as-needed conftest.c
makes program executable without core dumping.
Confirming this at least on amd64 with GCC 4.8.4 gcc-4.9 is stable now, so throwing away older bugs we don't plan on doing backports for as this should be fixed w/4.9+. please re-open if it's still an issue with 4.9.3+ though. (In reply to SpanKY from comment #9) > gcc-4.9 is stable now, so throwing away older bugs we don't plan on doing > backports for as this should be fixed w/4.9+. please re-open if it's still > an issue with 4.9.3+ though. You aren't right. This issue was find at sys-devel/gcc:4.7 and confirmed at sys-devel/gcc:4.8. So, proper resolution was TEST-REQUEST. For now: # gcc-config -l [1] x86_64-pc-linux-gnu-4.9.3 * The same source: $ diff conftest.c conftest_4.9.c shows no diffs On the only reliably identified issued package produces the same error: # ebuild /usr/portage/gentoo/net-fs/samba/samba-3.6.25.ebuild configure … # ls -l /tmp/cores/ итого 508 drwxrwxrwx 2 root root 80 окт 24 09:19 ./ drwxrwxrwt 11 root root 260 окт 24 09:19 ../ -rw------- 1 portage portage 294912 окт 24 09:19 core_conftest-11.5840 -rw------- 1 portage portage 892928 окт 24 09:19 core_conftest-6.9958 $ x86_64-pc-linux-gnu-gcc -o conftest -march=native -O2 -pipe -errwarn=%all -Diniparser_getstr\(d,i\)=iniparser_getstring\(d,i,NULL\) -Wl,-O1 -Wl,--as-needed conftest_4.9.c /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/../../../../x86_64-pc-linux-gnu/bin/ld: warning: cannot find entry symbol rrwarn=%all; defaulting to 0000000000400410 $ ./conftest Ошибка сегментирования (core dumped) For more complete revision packages for this issue feature from bug #560614 is needed. the crash is irrelevant. gcc does not support this flag. as the output shows, it uses -exxx as a pass through to the linker. hence the linker gets the weird flag which it treats as a symbol which messes up the link runtime. the fact that old gcc happened to work is irrelevant. |