[PATCH] D47895: llvm: Add support for "-fno-delete-null-pointer-checks"

George Burgess IV via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 2 16:57:08 PDT 2018


george.burgess.iv added a comment.

Swooping in on this admittedly quite late: should the objectsize bits in MemoryBuiltins.cpp be made aware of this?

In particular, the `ObjectSizeOffsetVisitor` will happily hand you "0 bytes are accessible here" if you hand it null (...though not if you ask it via `__builtin_object_size`, since that has a gcc-compat hack around NULL, as well). We should probably make the `NullIsUnknownSize` field we pass into that factor in whether the current `Function` has this new null-is-ok attribute on it.

...Since it's possible for us to just hand it a `ConstantPointerNull` without a `Function` attached, we probably need to plumb this in from callers of `llvm::getObjectSize`/`llvm::lowerObjectSizeCall`/...


Repository:
  rL LLVM

https://reviews.llvm.org/D47895





More information about the llvm-commits mailing list