[compiler-rt] [compiler-rt][ASan] Remove alignment message in ASan error reporting (PR #94103)
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 23 14:36:08 PDT 2024
vitalybuka wrote:
> Now I am confused. On trunk we can see the message, but [at least one argument must be truly incorrect](https://godbolt.org/z/4ejcovnWE), same with older LLVM versions.
Sorry, I clicked the first https://godbolt.org/ link which was messaging on 16 only, and forgot that it had instruction in the comment.
>
> What we can do is add a check to [crash test](https://github.com/llvm/llvm-project/blob/055e4319112282354327af9908091fdb25149e9b/compiler-rt/test/asan/TestCases/contiguous_container_crash.cpp).
>
> ```c++
> void BadBoundsUnaligned() {
> long t[100];
> // CHECK-BAD-BOUNDS-UNALIGNED: ERROR: AddressSanitizer: bad parameters to __sanitizer_annotate_contiguous_container
> // CHECK-BAD-BOUNDS-UNALIGNED: <rule telling that "beg is not aligned by" does not appear in the error message>
> __sanitizer_annotate_contiguous_container(&t[1], &t[0] + 100, &t[0] + 101,
> &t[0] + 50);
> }
> ```
>
> To confirm that this message does not contain "beg is not aligned by".
>
> If you think it makes sense, I will add it.
Yes, please.
https://github.com/llvm/llvm-project/pull/94103
More information about the llvm-commits
mailing list