This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Merging PCH to mainline


> Cc: gcc-patches@gcc.gnu.org
> Date: Fri, 10 Jan 2003 16:04:31 -0500
> From: David Edelsohn <dje@watson.ibm.com>
> X-OriginalArrivalTime: 10 Jan 2003 21:04:05.0843 (UTC) FILETIME=[CF883230:01C2B8EB]
> 
> 	Okay, then lets move on to the more serious failures.  Let me know
> what additional information you would like.

Very interesting.  OK, what's happening here is that somehow the
'struct function' of the inlinable function (or possibly a subobject
of it, maybe just the 'label' field of struct constant_descriptor_rtx)
is corrupted.  It is not because it isn't marked for GC; that
would give 0xa5a5a5a5 not 0xafafafaf.  It doesn't seem to be
specifically PCH-related, it is just that PCH walks over all these
structures and so will instantly notice if there is any invalid pointer.

Looking at the code in varasm.c seems to indicate that
constant_descriptor_rtx is allocated using ggc_alloc (and so not
cleared) in record_constant_rtx.  I don't see any place where
the 'label' field is initialised.  In fact, I can't find any place
where the 'label' field is even used.  I think I will try deleting it
and see what happens.

> #0  0xd01733a0 in strlen () from /usr/lib/libc.a(shr.o)
> #1  0x1001d5e4 in gt_pch_note_object (obj=0xafafafaf, 
>     note_ptr_cookie=0xafafafaf, 
>     note_ptr_fn=@0x2003ff5c: 0x10231b98 <gt_pch_p_S>)
>     at /u/dje/src/GNU/gcc/gcc/ggc-common.c:266
> #2  0x10231bdc in gt_pch_n_S (x=0x1) at /u/dje/src/GNU/gcc/gcc/stringpool.c:203
> #3  0x101edbdc in gt_pch_nx_constant_descriptor_rtx (x_p=0x30042000)
>     at gt-varasm.h:223
> #4  0x101eddd0 in gt_pch_nx_varasm_status (x_p=0xafafafaf) at gt-varasm.h:259
...

-- 
- Geoffrey Keating <geoffk@geoffk.org>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]