Summary: | >=sys-devel/gcc-7.4.0: internal compiler error: Segmentation fault when building net-analyzer/netcat-110-r9 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | ernsteiswuerfel <erhard_f> |
Component: | Current packages | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | netmon, slyfox, toolchain |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | PPC | ||
OS: | Linux | ||
URL: | https://gcc.gnu.org/PR88214 | ||
See Also: | https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88214 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
build.log
build-dir.tar.xz emerge --info nc.i nc.c |
Description
ernsteiswuerfel
2018-11-26 21:25:41 UTC
Created attachment 556424 [details]
build-dir.tar.xz
Created attachment 556426 [details]
emerge --info
Is that a reproducible problem or a one-off? (In reply to Jeroen Roovers from comment #3) > Is that a reproducible problem or a one-off? Yes, this is reproducible. Had a chat with slyfox on #gentoo-powerpc who suggested to try different gcc-versions: gcc-6.4.0-r5: success gcc-7.3.0-r3: failure gcc-8.2.0-r4: failure Created attachment 556432 [details]
nc.i
(In reply to Sergei Trofimovich from comment #5) > Created attachment 556432 [details] > nc.i That seems to be enough to chars gcc on timberdoodle on 32-bit UL as: $ LANG=C powerpc-unknown-linux-gnu-gcc -O2 -mcpu=powerpc -pipe -o nc.i -c nc.c (In reply to Sergei Trofimovich from comment #6) > (In reply to Sergei Trofimovich from comment #5) > > Created attachment 556432 [details] > > nc.i > > That seems to be enough to chars gcc on timberdoodle on 32-bit UL as: > $ LANG=C powerpc-unknown-linux-gnu-gcc -O2 -mcpu=powerpc -pipe -o nc.i > -c nc.c Fun fact: sparc32 also SIGSEGVs on that example: $ LANG=C sparc-unknown-linux-gnu-gcc-7.3.0 -O2 -pipe -c nc.i -o nc.o nc.i:44:3915: internal compiler error: Segmentation fault _timer (1, o_wait); if ( __sigsetjmp ( My guess it's a pointer size bug in gcc-7. Let's try to sort it on on toolchain@ side first. Created attachment 556442 [details]
nc.c
Shorter example:
$ cat nc.c
void i();
short a;
void b(e) char * e;
{
i();
b(a);
}
$ LANG=C sparc-unknown-linux-gnu-gcc-7.3.0 -Wall -O2 -pipe -o nc.o -c nc.c
nc.c: In function 'b':
nc.c:7:1: internal compiler error: Segmentation fault
$ LANG=C powerpc-unknown-linux-gnu-gcc -Wall -O2 -pipe -o nc.o -c nc.c
nc.c: In function 'b':
nc.c:7:1: internal compiler error: Segmentation fault
Note: it seems to be triggered by K&R-style function declarations.
Moving discussion to upstream bugtracker: https://gcc.gnu.org/PR88214 Queued for the next 8.2.0 and 7.4.0 gcc patchsets as: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=44f5a4b4d1884a2646f77195c172fe8065295d1d https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=ef2a97ee34b85bfb7865ce9d78d28b4a31294706 Meanwhile you can drop a patch to /etc/portage/patches/sys-devel/gcc/ and see if it works for you. Yes, I can confirm it builds fine now with gcc-7.4.0 + patch. Thanks! Thank you for testing! The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d27b9469785e09efe5e808af0dfbf7eebdeaf627 commit d27b9469785e09efe5e808af0dfbf7eebdeaf627 Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2018-12-26 19:37:14 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2018-12-26 19:39:59 +0000 sys-devel/gcc: bump up to 1.7 patchset Two new patches: + 114_all_kr-decl-PR88214.patch: ICE on k&r declarations + 115_all_avx2-SIGSEGV-PR86871.patch: ICE in vectorizer Bug: https://bugs.gentoo.org/672032 Bug: https://bugs.gentoo.org/657060 Package-Manager: Portage-2.3.52, Repoman-2.3.12 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> sys-devel/gcc/Manifest | 1 + sys-devel/gcc/gcc-8.2.0-r6.ebuild | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) Only gcc 8.2 patched? What about gcc 7.4 ? patch for 7.4.0 was queued in #c10 but did not get to patchset release yet. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d397de260edea710cd2452005473a440cbb79699 commit d397de260edea710cd2452005473a440cbb79699 Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2019-02-09 12:16:36 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2019-02-09 16:38:28 +0000 sys-devel/gcc: cut 1.2 patchset for 7.4.0 One new patch and one update: U 01_all_default-fortify-source.patch: make _FORTIFY_SOURCE portable + 21_all_kr-decl-PR88214.patch: fix SIGSEVs on net-analyzer/netcat Reported-by: ernsteiswuerfel Closes: https://bugs.gentoo.org/672032 Reported-and-tested-by: Martin Kletzander Tested-by: Tomáš Mózes Bug: https://bugs.gentoo.org/621036 Package-Manager: Portage-2.3.59, Repoman-2.3.12 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> sys-devel/gcc/Manifest | 1 + sys-devel/gcc/gcc-7.4.0-r1.ebuild | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) |