This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/26865] New: Segmentation fault with -std=c99 -O1 on genksyms.c
- From: "flash at pobox dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Mar 2006 05:54:48 -0000
- Subject: [Bug c/26865] New: Segmentation fault with -std=c99 -O1 on genksyms.c
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The attached preprocessed files, 122593_genksyms_min.i and its Delta-reduction
122593_genksyms_min.i, cause a segfault for checking=all builds of GCC 4.1.0 on
both Ubuntu 5.04 and OSX 10.4.5 with -std=c99 and -O1. The original .c and .h
files from the Linux kernel distribution (which I'll also attach) crash on
Ubuntu but not OSX. Ubuntu issues warnings before crashing, whereas OSX
compiles cleanly, which suggests a header problem. A checking=all build of
4.0.2 compiles all three versions of the file with warnings but no error, as
does a checking build of GCC 3.4.3; so this is a regression.
Here's the session:
48> /opt/gcc410-chk-all/bin/gcc -v -std=c99 -O1
../cpp/bugfiles/GCC_bugfiles/error/122593_genksyms_min.i
Using built-in specs.
Target: powerpc-apple-darwin8.5.0
Configured with: /opt/Gcc-4.1.0-dist/configure --enable-checking=all
--prefix=/opt/gcc410-chk-all --enable-languages=c,c++ --with-comment=PalmSource
checking=all build by Flash Sheridan 3/17/06
Thread model: posix
gcc version 4.1.0
/opt/gcc410-chk-all/libexec/gcc/powerpc-apple-darwin8.5.0/4.1.0/cc1
-fpreprocessed ../cpp/bugfiles/GCC_bugfiles/error/122593_genksyms_min.i -fPIC
-quiet -dumpbase 122593_genksyms_min.i -auxbase 122593_genksyms_min -O1
-std=c99 -version -o /var/tmp//cc4PRuEJ.s
GNU C version 4.1.0 (powerpc-apple-darwin8.5.0)
compiled by GNU C version 4.0.1 (Apple Computer, Inc. build 5247).
GGC heuristics: --param ggc-min-expand=0 --param ggc-min-heapsize=0
Compiler executable checksum: 1116648296470812f723ca4bff2463c0
../cpp/bugfiles/GCC_bugfiles/error/122593_genksyms_min.i:60: warning: return
type defaults to 'int'
../cpp/bugfiles/GCC_bugfiles/error/122593_genksyms_min.i:63: warning: return
type defaults to 'int'
../cpp/bugfiles/GCC_bugfiles/error/122593_genksyms_min.i:66: warning: return
type defaults to 'int'
../cpp/bugfiles/GCC_bugfiles/error/122593_genksyms_min.i:69: warning: return
type defaults to 'int'
../cpp/bugfiles/GCC_bugfiles/error/122593_genksyms_min.i:72: warning: return
type defaults to 'int'
../cpp/bugfiles/GCC_bugfiles/error/122593_genksyms_min.i: In function
'add_symbol':
../cpp/bugfiles/GCC_bugfiles/error/122593_genksyms_min.i:74: warning: implicit
declaration of function 'map_to_ns'
../cpp/bugfiles/GCC_bugfiles/error/122593_genksyms_min.i:75: warning: implicit
declaration of function 'strlen'
../cpp/bugfiles/GCC_bugfiles/error/122593_genksyms_min.i:75: warning:
incompatible implicit declaration of built-in function 'strlen'
../cpp/bugfiles/GCC_bugfiles/error/122593_genksyms_min.i:75: warning: implicit
declaration of function 'memcmp'
../cpp/bugfiles/GCC_bugfiles/error/122593_genksyms_min.i:75: warning: implicit
declaration of function 'strcmp'
../cpp/bugfiles/GCC_bugfiles/error/122593_genksyms_min.i: At top level:
../cpp/bugfiles/GCC_bugfiles/error/122593_genksyms_min.i:80: warning: return
type defaults to 'int'
../cpp/bugfiles/GCC_bugfiles/error/122593_genksyms_min.i:83: warning: return
type defaults to 'int'
../cpp/bugfiles/GCC_bugfiles/error/122593_genksyms_min.i:86: warning: return
type defaults to 'int'
../cpp/bugfiles/GCC_bugfiles/error/122593_genksyms_min.i:91: warning: return
type defaults to 'int'
../cpp/bugfiles/GCC_bugfiles/error/122593_genksyms_min.i:96: warning: return
type defaults to 'int'
../cpp/bugfiles/GCC_bugfiles/error/122593_genksyms_min.i: In function
'print_list':
../cpp/bugfiles/GCC_bugfiles/error/122593_genksyms_min.i:101: warning: implicit
declaration of function 'alloca'
../cpp/bugfiles/GCC_bugfiles/error/122593_genksyms_min.i:101: warning:
assignment makes pointer from integer without a cast
../cpp/bugfiles/GCC_bugfiles/error/122593_genksyms_min.i: At top level:
../cpp/bugfiles/GCC_bugfiles/error/122593_genksyms_min.i:106: warning: return
type defaults to 'int'
../cpp/bugfiles/GCC_bugfiles/error/122593_genksyms_min.i: In function
'expand_and_crc_list':
../cpp/bugfiles/GCC_bugfiles/error/122593_genksyms_min.i:111: warning: implicit
declaration of function 'error_with_pos'
../cpp/bugfiles/GCC_bugfiles/error/122593_genksyms_min.i: At top level:
../cpp/bugfiles/GCC_bugfiles/error/122593_genksyms_min.i:120: warning: return
type defaults to 'int'
../cpp/bugfiles/GCC_bugfiles/error/122593_genksyms_min.i:125: warning: return
type defaults to 'int'
../cpp/bugfiles/GCC_bugfiles/error/122593_genksyms_min.i:129: warning:
conflicting types for 'error_with_pos'
../cpp/bugfiles/GCC_bugfiles/error/122593_genksyms_min.i:111: warning: previous
implicit declaration of 'error_with_pos' was here
../cpp/bugfiles/GCC_bugfiles/error/122593_genksyms_min.i: In function
'genksyms_usage':
../cpp/bugfiles/GCC_bugfiles/error/122593_genksyms_min.i:138: warning: implicit
declaration of function 'fprintf'
../cpp/bugfiles/GCC_bugfiles/error/122593_genksyms_min.i:138: warning:
incompatible implicit declaration of built-in function 'fprintf'
../cpp/bugfiles/GCC_bugfiles/error/122593_genksyms_min.i: In function
'print_list':
../cpp/bugfiles/GCC_bugfiles/error/122593_genksyms_min.i:96: internal compiler
error: Bus error
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
---
PalmSource bug 122593
http://pobox.com/~flash
Quality Lead for Compilers and Debuggers
PalmSource, Inc. Tools Quality Management
--
Summary: Segmentation fault with -std=c99 -O1 on genksyms.c
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: flash at pobox dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26865