This is an archive of the discontinued LLVM Phabricator instance.

Fix PR31896.
ClosedPublic

Authored by eugenis on Feb 8 2017, 5:02 PM.

Details

Summary

Address of an alias of a global with offset is incorrectly lowered as an address of the global (i.e. ignoring offset).

This is fixing a problem introduced in D23195 and reported in PR31896.

I'm not really sure this is a correct fix, but
(a) I see no good reason for the chunk of the code that I'm removing to exist
(b) removing it does not break any tests and fixes PR31896

Diff Detail

Repository
rL LLVM

Event Timeline

eugenis created this revision.Feb 8 2017, 5:02 PM
olista01 requested changes to this revision.Feb 15 2017, 2:06 AM

I don't think this is correct for ROPI/RWPI. We need to look through the alias to check if the underlying object is read-only or read-write, as that affects how it should be addressed.

This revision now requires changes to proceed.Feb 15 2017, 2:06 AM
eugenis updated this revision to Diff 88982.Feb 17 2017, 3:55 PM
eugenis edited edge metadata.

I don't think this is correct for ROPI/RWPI. We need to look through the alias to check if the underlying object is read-only or read-write, as that affects how it should be addressed.

something like this?

This revision is now accepted and ready to land.Feb 20 2017, 1:39 AM
eugenis updated this revision to Diff 89262.Feb 21 2017, 12:19 PM

fixed the test

eugenis closed this revision.Feb 21 2017, 12:29 PM

Committed in r295762