[PATCH] D95238: [LangRef] Update memory access ops to raise UB if ptrs are not well defined
Johannes Doerfert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 22 07:37:54 PST 2021
jdoerfert added a comment.
+1 on the motivation. When we landed the other patch we didn't consider all the implications and, so far, they clearly outweigh the benefits of having partial undef offsets "work".
LGTM. Someone else?
================
Comment at: llvm/docs/LangRef.rst:12697
+If ``<len>`` is 0, the pointers may be NULL, dangling, ``undef``, or ``poison``
pointers. However, they must still be appropriately aligned.
+If ``<len>`` is not a well-defined value, the behavior is undefined.
----------------
Partially related: I never understood the alignment thing. `undef` and `poison` are not aligned. Violating `align` should result in a `poison` value, which we had in the first place. We should check why this is her.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95238/new/
https://reviews.llvm.org/D95238
More information about the llvm-commits
mailing list