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

James Molloy james.molloy at arm.com
Wed Jan 25 02:11:49 PST 2012


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.

Cheers,

James
-------------- next part --------------
A non-text attachment was scrubbed...
Name: isinsection.diff
Type: application/octet-stream
Size: 1539 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120125/6b3039d7/attachment.obj>


More information about the llvm-commits mailing list