llvm-project
llvm-project copied to clipboard
tsan: false positives on shmat
| Bugzilla Link | 40282 |
| Version | unspecified |
| OS | Linux |
Extended Description
Reported internally, don't have a public repro. The crux: shmat/shmdt allocate/deallocate memory (like mmap/munmap). We don't do anything in shmat/shmdt interceptors, so if the memory becomes reused across shmat calls in different threads, tsan may report a false positive. Accesses to the new mapping of the memory "race" with accesses to the old mapping at the same address. We need shmat/shmdt interceptors to do the same as mmap/munmap interceptors. Probably the common code to "map" and "unmap" a range can be factored out.
assigned to @vitalybuka