6 Aug 2011 08:58
Re: major internal compiler error on amd64 FreeBSD
Iain Hibbert <plunky <at> rya-online.net>
2011-08-06 06:58:17 GMT
2011-08-06 06:58:17 GMT
On Fri, 5 Aug 2011, Steve Kargl wrote:
> On Fri, Aug 05, 2011 at 12:29:31PM -0700, Steve Kargl wrote:
> >
> > Simplify testcase.
> >
> > void
> > parcomp(void)
> > {
> > double cost;
> > cost = __builtin_huge_val();
> > }
> >
> > If I compile pcc with gcc, then the resulting pcc
> > can compile the above compiles.
> >
> > If I compile pcc with itself, then the resulting
> > pcc fails to compile the above code.
> >
> > I have no clue on how to debug this one. :(
>
> troutmask:sgk[214] cd ~/pcc/pcc/cc//ccom
> troutmask:sgk[215] gdb ./ccom
> GNU gdb 6.1.1 [FreeBSD]
> (gdb) run z.c
> Starting program: /usr/home/sgk/pcc/pcc/cc/ccom/ccom z.c
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x00000000004025d0 in builtin_check () at ./builtins.c:630
> 630 return NIL;
I'd guess, that the builtin_check() function or something it called has
corrupted the return value held on the stack, or the stack pointer.. you
could compile with -fstack-protector to verify that, and a bit more
debugging with breakpoints might pin down the defective code..
iain
RSS Feed