This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug preprocessor/58893] [4.8/4.9/5 Regression] <command-line>:0:0: internal compiler error: Segmentation fault
- From: "bernd.edlinger at hotmail dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 24 Sep 2014 10:12:34 +0000
- Subject: [Bug preprocessor/58893] [4.8/4.9/5 Regression] <command-line>:0:0: internal compiler error: Segmentation fault
- Auto-submitted: auto-generated
- References: <bug-58893-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58893
Bernd Edlinger <bernd.edlinger at hotmail dot de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bernd.edlinger at hotmail dot de
--- Comment #10 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
Created attachment 33546
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33546&action=edit
possible fix
Hi,
I have looked at this issue, and think this is the right fix.
Regarding the hunk in cpp_diagnostic, which is not directly involved
in this bug, but still obviously wrong:
The line "src_loc = pfile->cur_run->prev->limit->src_loc"
is probably unreachable, but will crash it is ever executed.
see:
_cpp_init_tokenrun (tokenrun *run, unsigned int count)
{
run->base = XNEWVEC (cpp_token, count);
run->limit = run->base + count;
run->next = NULL;
}
limit points at the end of the run, prev is uninitialized.
Comments?