diff options
author | Thurston Dang <thurston@google.com> | 2024-01-25 20:07:48 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-25 12:07:48 -0800 |
commit | 720769de9f7531a79013b7e14ca808bdfc8fc258 (patch) | |
tree | b63ac3770d2caa7169e4a5c1c56289719397e4dc /llvm/tools/llvm-objdump/llvm-objdump.cpp | |
parent | 0b0cce8978eefce4b9b4eb1727f1f210a6b2a2d9 (diff) | |
download | llvm-720769de9f7531a79013b7e14ca808bdfc8fc258.zip llvm-720769de9f7531a79013b7e14ca808bdfc8fc258.tar.gz llvm-720769de9f7531a79013b7e14ca808bdfc8fc258.tar.bz2 |
[tsan] Lazily call 'personality' to minimize sandbox violations (#79334)
My previous patch, "Re-exec TSan with no ASLR if memory layout is incompatible on Linux (#78351)" (0784b1eefa36d4acbb0dacd2d18796e26313b6c5) hoisted the 'personality' call, to share the code between Android and non-Android Linux. Unfortunately, this eager call to 'personality' may trigger sandbox violations on non-Android Linux.
This patch fixes the issue by only calling 'personality' on non-Android Linux if the memory mapping is incompatible. This may still cause a sandbox violation, but only if it was going to abort anyway due to an incompatible memory mapping.
(The behavior on Android Linux is unchanged by this patch or the previous patch.)
Diffstat (limited to 'llvm/tools/llvm-objdump/llvm-objdump.cpp')
0 files changed, 0 insertions, 0 deletions