Bug 1040213

Summary: segfault when building kernel.
Product: [Fedora] Fedora Reporter: Dave Jones <davej>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: jakub, law, pfrields
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-13 00:55:57 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Dave Jones 2013-12-10 23:54:39 UTC
There's a check in the kernel build for presence of -fstack-protector (that arg is unrelated).
The C code that it passes seems to introduce a segv whether -fstack-protect is passed or not..

libgcc-4.8.2-1.fc20.x86_64
gcc-c++-4.8.2-1.fc20.x86_64
gcc-4.8.2-1.fc20.x86_64

$ cat test.c
int foo(void) { char X[200]; return 3; }

$ gcc test.c 
gcc: internal compiler error: Segmentation fault (program cc1)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.

Comment 1 Dave Jones 2013-12-13 00:55:57 UTC
just realised it segv's with *any* C file.

$ gdb /usr/libexec/gcc/x86_64-redhat-linux/4.8.2/cc1 core.24252 
Reading symbols from /usr/libexec/gcc/x86_64-redhat-linux/4.8.2/cc1...Reading symbols from /usr/lib/debug/usr/libexec/gcc/x86_64-redhat-linux/4.8.2/cc1.debug...done.
done.
[New LWP 24252]
Core was generated by `/usr/libexec/gcc/x86_64-redhat-linux/4.8.2/cc1 -quiet test.c -quiet -dumpbase t'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00000000003f4c10 in ?? ()
(gdb) bt
#0  0x00000000003f4c10 in ?? ()
#1  0x0000000000df937d in __libc_csu_init ()
#2  0x00007f8449146cf5 in __libc_start_main (main=0x77fbe0 <main(int, char**)>, argc=12, argv=0x7fffcce7f558, init=0xdf9330 <__libc_csu_init>, fini=<optimized out>, rtld_fini=<optimized out>, 
    stack_end=0x7fffcce7f548) at libc-start.c:244
#3  0x0000000000ce845d in _start ()


Bizarre.

The root disk on this machine is failing, so maybe some shared library got corrupted, but somehow only gcc is affected.

it's getting reinstalled on a new disk tomorrow, so I'll just assume this is bad hardware related.