]> granicus.if.org Git - gc/commit
Workaround TSan false positive in write fault handler
authorIvan Maidanski <ivmai@mail.ru>
Fri, 10 Nov 2017 15:14:55 +0000 (18:14 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Fri, 10 Nov 2017 15:17:32 +0000 (18:17 +0300)
commit908fe369fc39be0a81ec6dd029f388ff673e4c46
tree64165c115798d5ce96c14c1fa3a35e98ee7a4c2b
parent419f4de9124f89656f9474ef984d854cb909baf6
Workaround TSan false positive in write fault handler

The data races reported between GC_write_fault_handler,
catch_exception_raise and GC_install_header, GC_remove_header are OK
as the added or removed header should be already unprotected.

* os_dep.c [MPROTECT_VDB && THREADS] (is_header_found_async): New
static function (with GC_ATTR_NO_SANITIZE_THREAD attribute).
* os_dep.c [MPROTECT_VDB && !THREADS] (is_header_found_async): New
macro.
* os_dep.c [MPROTECT_VDB && !DARWIN] (GC_write_fault_handler): Use
is_header_found_async() instead of HDR(addr)!=0.
* os_dep.c [MPROTECT_VDB && DARWIN] (catch_exception_raise): Likewise.
os_dep.c