Andrew Pinski <pins...@gmail.com> writes:

> On Tue, Mar 22, 2011 at 9:42 AM, Ian Lance Taylor <i...@google.com> wrote:
>>
>> Any target on which _Unwind_Word is larger than void * is broken today,
>> so I don't think we need to care about that case.
>
> So a MIPS N32 is broken?  Lots of people use that target already and
> nothing like this has showed up yet.

That is a fair question.  It does seem to me that it must be broken in
some cases.  _Unwind_GetGRPtr will return &context->reg[index], which is
a void** cast to void*.  We will then pass that to _Unwind_SetGRPtr.  If
we later call _Unwind_SetGR on that register, it will write a value of
size _Unwind_Word through that pointer.  Similarly if we call
_Unwind_GetGR, it will read a value of size _Unwind_Word.  In both
cases, we will be accessing a 4-byte field as an 8-byte value.

If MIPS N32 works today, then something must be ensuring that that
sequence can never occur, or that for some reason it never matters.

Does anybody disagree with this analysis?

Ian

Reply via email to