Bug 1040213 - segfault when building kernel.
Summary: segfault when building kernel.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-10 23:54 UTC by Dave Jones
Modified: 2015-01-04 22:32 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-13 00:55:57 UTC
Type: Bug


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.