[compiler-rt] -fsanitize=alignment: check memcpy/memmove arguments (PR #67766)
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 29 11:23:27 PDT 2023
================
@@ -47,6 +50,16 @@ int main(int, char **argv) {
return *p && 0;
// CHECK-STACK-LOAD: #0 {{.*}}main{{.*}}misaligned.cpp
+ case 'L': {
+ int x;
+ // CHECK-MEMCPY-LOAD: misaligned.cpp:[[#@LINE+4]]{{(:16)?}}: runtime error: load of misaligned address [[PTR:0x[0-9a-f]*]] for type 'const void *', which requires 4 byte alignment
----------------
vitalybuka wrote:
Maybe not wrong, but unhelpful.
Issue is that 'int*' was misaligned, not that we pass it into void*.
https://github.com/llvm/llvm-project/pull/67766
More information about the llvm-commits
mailing list