[compiler-rt] [TSan] Clarify and enforce shadow end alignment (PR #144648)
Kunqiu Chen via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 22 23:43:48 PDT 2025
================
@@ -0,0 +1,32 @@
+// RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s
----------------
Camsyn wrote:
If it was unfixed in your environment, that was an exception (and would you mind providing more information about the test failure, such as the triggering environment?);
This relevant bug should indeed be fixed by this PR, and I have passed this test (Ubuntu24.04 at x86_64) before I pushed the commit.
FYI, this test case manages to trigger a situation that `munmap` clears the meta incompletely due to the incorrect usage of an inclusive meta end. However, this bug should be fixed in this PR, as follows:
```cpp
// This round-up gives the exclusive meta end.
uptr size_for_meta = RoundUp(addr + size, kMetaShadowCell) - addr;
ctx->metamap.ResetRange(thr->proc(), addr, size_for_meta, true);
```
https://github.com/llvm/llvm-project/pull/144648
More information about the llvm-commits
mailing list