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

James Molloy james.molloy at arm.com
Fri Jan 27 00:55:08 PST 2012


Ping!

-----Original Message-----
From: llvm-commits-bounces at cs.uiuc.edu
[mailto:llvm-commits-bounces at cs.uiuc.edu] On Behalf Of James Molloy
Sent: 25 January 2012 10:12
To: llvm-commits at cs.uiuc.edu
Subject: [llvm-commits] [PATCH] Fix assertion failure in MC

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







More information about the llvm-commits mailing list