[all-commits] [llvm/llvm-project] 1db68f: tsan: fix mmap atomicity
Dmitry Vyukov via All-commits
all-commits at lists.llvm.org
Thu Jun 24 00:47:58 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 1db68fcd8e76dc6437f028c8ace408aa7d04e647
https://github.com/llvm/llvm-project/commit/1db68fcd8e76dc6437f028c8ace408aa7d04e647
Author: Dmitry Vyukov <dvyukov at google.com>
Date: 2021-06-24 (Thu, 24 Jun 2021)
Changed paths:
M compiler-rt/lib/tsan/rtl/tsan_rtl.cpp
A compiler-rt/test/tsan/mmap_stress2.cpp
Log Message:
-----------
tsan: fix mmap atomicity
Mmap interceptor is not atomic in the sense that it
exposes unmapped shadow for a brief period of time.
This breaks programs that mmap over another mmap
and access the region concurrently.
Don't unmap shadow in the mmap interceptor to fix this.
Just mapping new shadow on top should be enough to zero it.
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D104593
More information about the All-commits
mailing list