Page MenuHomePhabricator

Make llvm.objectsize more conservative with null in non-zero address spaces
ClosedPublic

Authored by george.burgess.iv on Jul 2 2018, 5:59 PM.

Details

Summary

NULL in non-zero address spaces is dereferenceable/etc, so we probably shouldn't be assuming that its objectsize is zero.

arsenm: pulling you in to confirm that this change isn't breaking code you care about somehow (re: the comment from you on https://reviews.llvm.org/D28494 ). If this does break something, I'm happy to try and find some middle-ground. I'm sort of assuming the intent of that comment was more along the lines of "if this is a gcc-compat hack, we should limit it to addrspace(0), which is presumably the only place where we care," though.

Diff Detail

Repository
rL LLVM

Event Timeline

nlopes accepted this revision.Jul 3 2018, 3:19 PM
nlopes added a subscriber: nlopes.

LGTM

This revision is now accepted and ready to land.Jul 3 2018, 3:19 PM

Thanks!

(I'll go ahead and commit assuming my interpretation of arsenm's message was correct. Happy to revert or land follow-ups if not)

This revision was automatically updated to reflect the committed changes.