PATCH: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

Jakub Jelinek jakub@redhat.com
Wed Mar 23 18:04:00 GMT 2011


On Wed, Mar 23, 2011 at 10:50:35AM -0700, Richard Henderson wrote:
> >>
> >> Sure, that's easy.  I think what you are really asking is: will there be
> >> a case where we could call functions from one copy and then pass the
> >> context to the functions from a different copy.  I don't know the answer
> >> to that, but it doesn't seem impossible.
> 
> It really shouldn't be, but judging from the existance of _Unwind_IsExtendedContext
> it appears that it really is.  Which, frankly, I assume is some sort of strange
> packaging problem between glibc and libgcc_s.so.
> 
> Jakub, do you recall anything more specific about this?

http://gcc.gnu.org/ml/gcc-patches/2006-12/msg01769.html
has some info.

> Ideally we'd remove the by_value array, but I guess that's now versioned
> so it'll have to stay even though unused.
> 
> Add a new
> 
> 	_Unwind_Word data[DWARF_FRAME_REGISTERS+1];
> 
> at the end.  Increment the context version number.  If the version is

For several targets that would grow the context significantly, do you think
we really have to do that for all targets rather than just for the
sizeof (_Unwind_Word) > sizeof (void *) ones?  The accessors are wrapped
in inline functions anyway.

> sufficiently high, implement _Unwind_SetGRValue via
> 
> 	context->data[index] = val;
> 	context->reg[index] = &context->data[index];
> 
> and do not set by_value at all.

	Jakub



More information about the Gcc-patches mailing list