Unpoison stack memory before deallocation
Summary:
This is a workaround (maybe even the correct fix if it turns out that ASan
can't detect this FP case) for the problem described in
https://llvm.org/bugs/show_bug.cgi?id=27627
where a memory region previously allocated by a fiber stack can overlap with
the region of an mmap'd file. Accessing parts of the mmap'd file close to
the stack region will trigger a false positive ASan error.
This change makes sure each fiber explicitly unpoisons its stack memory by
calling __asan_unpoison_memory_region in an ASan-enabled build.
Reviewed By: yhfung
Differential Revision:
D3257924
fb-gh-sync-id:
484062e80af67dfd39d2eaf3cbb52fa3483924eb
fbshipit-source-id:
484062e80af67dfd39d2eaf3cbb52fa3483924eb