This is an archive of the discontinued LLVM Phabricator instance.

Fix implicit null check with negative offset
ClosedPublic

Authored by yuyichao on Oct 14 2017, 4:27 PM.

Details

Summary

It seems that negative offset was accidentally allowed in D17967.
AFAICT small negative offset should be valid (always raise segfault) on all archs that I'm aware of (especially x86, which is the only one with this optimization enabled) and such case can be useful when loading hiden metadata from an object.

However, like the positive side, it should only be done within a certain limit.
For now, use the same limit on the positive side for the negative side.
A separate option can be added if needs appear.

Diff Detail

Repository
rL LLVM

Event Timeline

yuyichao created this revision.Oct 14 2017, 4:27 PM
sanjoy edited reviewers, added: skatkov; removed: sanjoy.Oct 14 2017, 5:12 PM
sanjoy added a subscriber: sanjoy.
skatkov accepted this revision.Oct 15 2017, 7:46 PM
This revision is now accepted and ready to land.Oct 15 2017, 7:46 PM

Thanks for review.

This revision was automatically updated to reflect the committed changes.