================ @@ -14,12 +15,17 @@ __attribute__((noinline)) void init(S *s) { __asm__ __volatile__("" : : "r"(s) : "memory"); } -__attribute__((noinline, no_sanitize("memory"))) int test(char i) { +__attribute__((noinline, no_sanitize("memory", "address", "hwaddress"))) int +test(char i) { S a; init(&a); S b; init(&b); return ((int *)(&a))[i]; + // CHECK: error: access out of bounds + // CHECK: SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior + // LINE: local_bounds.cpp:[[@LINE-3]]:{{.*}}runtime error: access out of bounds ---------------- MaskRay wrote:
`[[#@LINE-3]]` for new tests. `[[@LINE]]` is deprecated https://github.com/llvm/llvm-project/pull/120515 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits