[all-commits] [llvm/llvm-project] 720769: [tsan] Lazily call 'personality' to minimize sandb...
Thurston Dang via All-commits
all-commits at lists.llvm.org
Thu Jan 25 12:08:00 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 720769de9f7531a79013b7e14ca808bdfc8fc258
https://github.com/llvm/llvm-project/commit/720769de9f7531a79013b7e14ca808bdfc8fc258
Author: Thurston Dang <thurston at google.com>
Date: 2024-01-25 (Thu, 25 Jan 2024)
Changed paths:
M compiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp
Log Message:
-----------
[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.)
More information about the All-commits
mailing list