This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: preprocessor/6084: cpp Segmentation Fault
- From: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- To: "Gerwin, Joshua A" <joshua dot a dot gerwin at intel dot com>
- Cc: 'Phil Edwards' <phil at jaj dot com>, joshg at hf dot intel dot com,gcc-gnats at gcc dot gnu dot org, rnesius at ichips dot intel dot com,"Nguyen, Tuan" <tuan dot nguyen at intel dot com>, gcc-bugs at gcc dot gnu dot org
- Date: Sat, 13 Apr 2002 06:07:26 +0100
- Subject: Re: preprocessor/6084: cpp Segmentation Fault
- References: <01BDB7EEF8D4D3119D95009027AE999511A3D5D7@FMSMSX33>
Gerwin, Joshua A wrote:-
> #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 ()
As I've already pointed out to you, and you confirmed with your
mail, there is no fprintf() in the function maybe_print_line.
> Also noteworthy, reversing the parameters fixes the segfault!
That makes me even more suspicious that something is very wrong
with your env. Exactly the same code should be running, with the
same internal state, once you get to do_preprocessing()
when you flip the order.
> Here's the maybe_print_line function and related symbols, for handy
> reference:
I have the source on my machine, and the types, so this doesn't help.
What does help is you backing up the call stack and finding out why
the segfault is happening (and the offending variable at the time).
Phil, could I ask you to try what Joshua claims above on 3.0 branch,
if you still have it lying around? If you still can't get anything,
I'll close this PR, since it is unreproducable with a seemingly
impossible backtrace.
Thanks a lot,
Neil.