[all-commits] [llvm/llvm-project] 5d2d83: [AddressSanitizer] Remove memory effects from func...
Guy David via All-commits
all-commits at lists.llvm.org
Mon Mar 10 01:37:01 PDT 2025
Branch: refs/heads/users/guy-david/asan-memory-effects
Home: https://github.com/llvm/llvm-project
Commit: 5d2d8390260d3f3d55cd3d73dbdb3db946e72249
https://github.com/llvm/llvm-project/commit/5d2d8390260d3f3d55cd3d73dbdb3db946e72249
Author: Guy David <guyda96 at gmail.com>
Date: 2025-03-10 (Mon, 10 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