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

Dávid Bolvanský via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 3 12:32:45 PDT 2019


xbolva00 added inline comments.


================
Comment at: compiler-rt/test/ubsan/TestCases/Pointer/index-overflow.cpp:15
+  // ERR2: runtime error: pointer index expression with base {{.*}} overflowed to
+  // ERR1: runtime error: subtracting integral value of non-null pointer 0x{{.*}} from pointer itself is undefined
 
----------------
Not very friendly error msg since the original code has no sub.


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