Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [netbsd-5] internal compiler error when building GENERIC



On Thursday 05 February 2009, David Laight wrote:
> On Thu, Feb 05, 2009 at 03:12:10PM +0100, Jukka Salmi wrote:
> > $ cd /tmp && touch test.c
> > $ sudo chown 0:0 test.c
> > $ sudo chmod 600 test.c
> > $ gcc test.c
> > cc1: internal compiler error: Segmentation fault
>
> I guess the thing to do is:
> 1) compile gcc with -g
> 2) patch the kernel to stop SIGSEGV being intercepted
> 3) look at the generated core file

Looks like /usr/libexec/cc1 faults in linemap_lookup (libcpp/line-map.c) which 
interestingly contains the following comment:

        "We should get a segfault if no line_maps have been added yet."

Here's the backtrace:

Program received signal SIGSEGV, Segmentation fault.
0x083ab5b2 in linemap_lookup ()
(gdb) bt
#0  0x083ab5b2 in linemap_lookup ()
#1  0x083ab20b in _cpp_begin_message ()
#2  0x083ab487 in cpp_error ()
#3  0x083ab543 in cpp_errno ()
#4  0x083a1a9c in _cpp_read_file_entries ()
#5  0x083a32b1 in _cpp_find_file ()
#6  0x083a0f3b in cpp_read_main_file ()
#7  0x08079189 in c_common_post_options ()
#8  0x08122941 in toplev_main ()
#9  0x0808eeab in main ()



Home | Main Index | Thread Index | Old Index