[compiler-rt] [TSan] Clarify and enforce shadow end alignment (PR #144648)
Kunqiu Chen via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 2 04:04:02 PDT 2025
Camsyn wrote:
>
> Turning off the test case is unacceptable - that'd be a regression.
>
> Could you explain why this commit introduced the regression?
This triggered test case `munmap_clear_shadow.c` was supposed to be part of this PR, but was separated into my other PR #145472, adhering to the review suggestion.
I did pass the test case in my environment of Linux/x86_64, but lacked consideration of other platforms.
Therefore, it caused the test case to still be triggered in IOS as the cleared shadow is not set to 0 after `ReleaseMemoryPagesToOS`.
> In IOS, it executes madvise(beg, end, MADV_FREE), which tags the relevant pages as 'FREE' and does not release them immediately.
In Linux, it executes madvise(beg, end, MADV_DONTNEED), releasing the pages immediately and setting them to 0.
https://github.com/llvm/llvm-project/pull/144648
More information about the llvm-commits
mailing list