[llvm-commits] [PATCH] Fix assertion failure in MC

Rafael Ávila de Espíndola rafael.espindola at gmail.com
Thu Jan 26 18:48:24 PST 2012


On 25/01/12 05:11 AM, James Molloy wrote:
> Hi,
> 
> The attached patch fixes an assertion failure in the MC when chains of
> aliases are used.
> 
> This was discovered by PlumHall C++ and the testcase was reduced and
> anonymised from that. The main issue is if an alias points to another alias,
> there is no guarantee on the order that the MC layer will initialise the
> values in their MCSymbol representations.
> 
> Because of this it is possible for an alias to purport to have a null
> Section field when it shouldn't, and an assertion fires in IsInSection().
> The patch fixes this by changing IsInSection() to first follow aliases
> transitively before returning or asserting.
> 
> Review requested.

This introduces an uncomfortable asymmetry between isInSection and
getSection. Maybe isInSection should be changed too?

Do you know why this is ARM specific? The same IL works on X86. Maybe it
is the caller that has to change.

> Cheers,
> 
> James
> 

Cheers,
Rafael



More information about the llvm-commits mailing list