[PATCH] Fix Ada bootstrap failure

Robert Dewar dewar@adacore.com
Fri Sep 2 15:57:00 GMT 2011


On 9/2/2011 11:47 AM, Michael Matz wrote:
> Hi,
>
> On Fri, 2 Sep 2011, Robert Dewar wrote:
>
>> On 9/2/2011 9:16 AM, Richard Guenther wrote:
>>
>> Might be interesting to pursue, but we don't know that the null pointers
>> being dereferenced are in fact the ones returned by alloca. May not be
>> worth the effort.
>
> Given the nature of the work-around which makes Ada work again it's fairly
> sure that the Ada frontend does emit accesses to an alloca'ed area of
> memory even if its size is zero.  I.e. definitely a real bug.

maybe so, but I gave a scenario (there are others) in which exceptions
are legitimately raised without deferencing the pointer. Once an
exception is raised all sorts of funny things can happen (e.g.
tasks silently terminating fi they have no top level exception
handler), so you can't make that direct conclusion.

I guess if you made alloca(0) return a junk non-derefencable
address, *that* would be definitive.
>
>
> Ciao,
> Michael.



More information about the Gcc-patches mailing list