[all-commits] [llvm/llvm-project] 8c0b3c: [AddressSanitizer] Remove memory effects from func...
Guy David via All-commits
all-commits at lists.llvm.org
Thu Mar 13 02:41:02 PDT 2025
Branch: refs/heads/users/guy-david/asan-memory-effects
Home: https://github.com/llvm/llvm-project
Commit: 8c0b3c974efee646261db7b3ecc3893fb76ba846
https://github.com/llvm/llvm-project/commit/8c0b3c974efee646261db7b3ecc3893fb76ba846
Author: Guy David <guyda96 at gmail.com>
Date: 2025-03-13 (Thu, 13 Mar 2025)
Changed paths:
M llvm/include/llvm/Transforms/Instrumentation/AddressSanitizerCommon.h
M llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
M llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
M llvm/test/Instrumentation/AddressSanitizer/AMDGPU/asan_instrument_mem_intrinsics.ll
A llvm/test/Instrumentation/AddressSanitizer/remove-memory-effects.ll
Log Message:
-----------
[AddressSanitizer] Remove memory effects from functions
If left as-is, subsequent optimizations might utilize the possible
memory effects and optimize-out the instrumentation. Think of the
following case:
```
store i8 4, ptr %shadow
call void @llvm.lifetime.start.p0(i64 4, ptr %local)
%28 = call void @foo(ptr %local)
store i8 -8, ptr %shadow
call void @llvm.lifetime.end.p0(i64 4, ptr %local)
```
where `foo` is an external function with `memory(argmem: write)`. A pass
such as DeadStoreElimination is allowed to remove the initial store,
which might fail sanitizer checks within `foo`.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list