preprocessor/6084: cpp Segmentation Fault

'Neil Booth' neil@daikokuya.demon.co.uk
Wed Apr 3 22:30:00 GMT 2002


Gerwin, Joshua A wrote:-

> (gdb) run -dM -dD ../accessories/hello.c
> Starting program:
> /(path/to)/gcc/3.0.3-64/lib/gcc-lib/sparcv9-sun-solaris2/3.0.3/cpp0 -dM -dD
> ../accessories/hello.c
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0xffffffff7f44035c in strlen () from /usr/lib/64/libc.so.1
> (gdb) bt
> #0  0xffffffff7f44035c in strlen () from /usr/lib/64/libc.so.1
> #1  0xffffffff7f48d6d4 in _doprnt () from /usr/lib/64/libc.so.1
> #2  0xffffffff7f48f180 in fprintf () from /usr/lib/64/libc.so.1
> #3  0x100003d28 in maybe_print_line ()
> #4  0x100003e1c in cb_define ()
> #5  0x100004904 in do_define ()
> #6  0x100004778 in run_directive ()
> #7  0x100011d20 in init_builtins ()
> #8  0x100012344 in cpp_start_read ()
> #9  0x100003680 in do_preprocessing ()
> #10 0x10000349c in main ()

That's curious, because there is no fprintf in my version of 3.0.3
in maybe_print_line.  Have you patched yours from stock 3.0.3?

Could you do some more research - I have no clue from the above
backtrace.  Maybe step in yourself and see what's going wrong?

Neil.



More information about the Gcc-bugs mailing list