[PATCH] D40941: [ubsan] Use pass_object_size info in bounds checks (compiler-rt)

George Burgess IV via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 7 16:26:01 PST 2017


george.burgess.iv added a comment.

If the answer to my question is "no, it'll just work," LGTM. Thanks!



================
Comment at: test/ubsan/TestCases/Misc/bounds.cpp:9
+int get_int(int *const p __attribute__((pass_object_size(0))), int i) {
+  // CHECK-A-2: bounds.cpp:[[@LINE+1]]:10: runtime error: index 2 out of bounds for type 'int *'
+  return p[i];
----------------
Do we need extra `RUN:` lines/CHECK prefixes for these? I thought ubsan runtime errors terminated the program.


https://reviews.llvm.org/D40941





More information about the cfe-commits mailing list