aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineBasicBlock.cpp
diff options
context:
space:
mode:
authorMariusz Borsa <wrotki@msn.com>2023-11-12 14:44:43 -0800
committerGitHub <noreply@github.com>2023-11-12 14:44:43 -0800
commitc2205ab30917e2718e8863d905b52b5dc453bd96 (patch)
tree531344c83f09bb1717fe502fd30f0f10ed60f2b2 /llvm/lib/CodeGen/MachineBasicBlock.cpp
parent4c3206c5d5dee9dc3c7ad32c09d57a7fc592bcea (diff)
downloadllvm-c2205ab30917e2718e8863d905b52b5dc453bd96.zip
llvm-c2205ab30917e2718e8863d905b52b5dc453bd96.tar.gz
llvm-c2205ab30917e2718e8863d905b52b5dc453bd96.tar.bz2
[Sanitizers][Darwin] Pass offset to __asan_set_shadow_xx (#71745)
Normally, when __asan_option_detect_stack_use_after_return option is set, the instrumentation passed the adress of the shadow memory bytes to be set, for detecting problems with local variables. This can be a problem when the -fsanitize-stable-abi option is in effect, since the ABI implementation doesn't have means to communicate the current shadow memory base address back to its users. This change addresses it simply by setting __asan_shadow_memory_dynamic_address to zero. It means that __asan_set_shadow_xx will be now called with the offset relative to the current shadow memory base, and the ABI implementation needs to adapt accordingly. The other change here is to set __asan_option_detect_stack_use_after_return to nonzer by default, which is needed for instrumentation to take paths using the __asan_shadow_memory_dynamic_address and __asan_set_shadow_xx calls. Co-authored-by: Mariusz Borsa <m_borsa@apple.com>
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
0 files changed, 0 insertions, 0 deletions