Summary: | sys-devel/gcc-7.2.0 : cc1: internal compiler error: in fail, at selftest.c:46 (USE=debug) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Toralf Förster <toralf> |
Component: | Current packages | Assignee: | The Gentoo Linux Hardened Team <hardened> |
Status: | RESOLVED OBSOLETE | ||
Severity: | normal | CC: | bertrand, moltonel, slyfox, toolchain |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
emerge-info.txt
emerge-history.txt environment etc.portage.tbz2 logs.tbz2 sys-devel:gcc-7.2.0:20180107-161618.log temp.tbz2 |
Description
Toralf Förster
2018-01-07 16:42:06 UTC
Created attachment 513670 [details]
emerge-info.txt
Created attachment 513672 [details]
emerge-history.txt
Created attachment 513674 [details]
environment
Created attachment 513676 [details]
etc.portage.tbz2
Created attachment 513678 [details]
logs.tbz2
Created attachment 513680 [details]
sys-devel:gcc-7.2.0:20180107-161618.log
Created attachment 513682 [details]
temp.tbz2
Is it easily reproducible on your side? I tried locally with -march=native and it did not break. Can you post our output of: $ gcc -Q -O2 --help=target -march=native $ gcc -Q -O2 --help=optimizers -march=native (In reply to Sergei Trofimovich from comment #8) > Is it easily reproducible on your side? > > I tried locally with -march=native and it did not break. Can you post our > output of: > > $ gcc -Q -O2 --help=target -march=native > $ gcc -Q -O2 --help=optimizers -march=native Ah, please disregard that. It's USE=debug! Now it crashes for me the same way. (In reply to Sergei Trofimovich from comment #9) > (In reply to Sergei Trofimovich from comment #8) > > Is it easily reproducible on your side? > > > > I tried locally with -march=native and it did not break. Can you post our > > output of: > > > > $ gcc -Q -O2 --help=target -march=native > > $ gcc -Q -O2 --help=optimizers -march=native > > Ah, please disregard that. It's USE=debug! Now it crashes for me the same > way. Poked a bit more: it's caused by -fstack-protector-all injected by this patch and enabled via EXTRA_OPTS: https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo/src/patchsets/gcc/7.2.0/gentoo/55_all_extra-options.patch?revision=1.1&view=markup GCC test assumes CFG has 3 entries: /* Verify that we have a simple 3-block CFG: the two "fake" ones, and a "real" one: [ENTRY] -> [block2] -> [EXIT]. */ static void verify_three_block_cfg (function *fun) { ASSERT_TRUE (fun->cfg != NULL); ASSERT_EQ (3, n_basic_blocks_for_fn (fun)); The assert fails because n_basic_blocks_for_fn (fun) is 5. I guess it's our entry/exit stack checks. Reassigning to hardened@ to either #ifdef out failed debug tests or do them more robust. (In reply to Sergei Trofimovich from comment #10) Which looks a little bit like the same like a recent patch for the Linux kernel (commit id 3ce120b16cc5484) : Makefile:KBUILD_CFLAGS += $(call cc-option,-fno-stack-check,) to overcome a boot error of Gentoo hardened linux boxes. This failure happes not due to gcc being built wit stack check, but due to codegen inserts stack checks by default (./configure --enable-default-ssp). I tried to reproduce it on gcc-9 and do not observe the error. Test did not seem to have changed since. My guess it's because hardened switched from fstack-protector-all to -fstack-protector-strong by defaut. Closing as OBSOLETE. |