c/5176: Segmentation fault with undocumented command line option

jeff@enborne.demon.co.uk jeff@enborne.demon.co.uk
Sat Dec 22 13:50:00 GMT 2001


>Number:         5176
>Category:       c
>Synopsis:       Segmentation fault with undocumented command line option
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Dec 22 06:46:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Jeff Goodenough
>Release:        gcc version 2.96 20000731 (Red Hat Linux 7.0)
>Organization:
>Environment:
PC Pentium III, LILO dual boot (with Windows 2000).
Default installation from CDs supplied with "Red Hat Linux 7 Bible" by Christopher Negus. IDG Books ISBN 0-7645-4778-X
>Description:
Initially used an hp makefile which included the (unknown?) option -Ae on the command line.  Even with simple "Hello world" source, compiler crashes with segmentation fault.

Compiler output (stdout + stderr):

cc -I. -Ae  -c hw.c
cc: Internal error: Segmentation fault (program cpp0)
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
make: *** [hw.o] Error 1

Source (hw.c) is:

int main()
{
	printf ("Hello world!\n");
}

Command line is:

cc -I. -Ae  -c hw.c

(there are no header files, however)
>How-To-Repeat:
Compile the program with the command line given.
>Fix:
Remove the -Ae option.

Reported because your own documentation says a well-behaved compiler should not crash with invalid input.
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-bugs mailing list