[PATCH] D67122: [UBSan][clang][compiler-rt] Applying non-zero offset to nullptr is undefined behaviour

Richard Smith - zygoloid via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 9 16:03:30 PDT 2019


rsmith accepted this revision.
rsmith added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang/docs/ReleaseNotes.rst:66
+  defined if it adds a non-zero offset (or in C, any offset) to a null pointer,
+  or that forms a null pointer by subtracting an integer from a non-null
+  pointer, and the LLVM optimizer now uses those guarantees for transformations.
----------------
Oops, "that" -> "if it" here.


================
Comment at: clang/docs/ReleaseNotes.rst:252
+- * The ``pointer-overflow`` check was extended added to catch the cases where
+    where a non-zero offset is applied to a null pointer, or the result of
+    applying the offset is a null pointer.
----------------
Delete one of these two "where"s.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67122/new/

https://reviews.llvm.org/D67122





More information about the llvm-commits mailing list