[PATCH] D67122: [UBSan][clang][compiler-rt] Applying non-zero offset to nullptr is undefined behaviour
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 3 11:57:26 PDT 2019
aaron.ballman added a comment.
One fear I have with this is in expansions of the `offsetof` macro, where it is a common implementation strategy to cast a null pointer to be of the correct type when calculating member offsets. Do you think you will be able to distinguish between null pointer additions that the user wrote directly (which is UB) as opposed to null pointer additions that come from the implementation (which is not UB)?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67122/new/
https://reviews.llvm.org/D67122
More information about the cfe-commits
mailing list