Buffer should be referenced by results so used parts will be unpoisoned with unpoison_group and unpoison_passwd.
This fixes TSAN performance issue made us to disable this interceptors.
Paths
| Differential D57731
[sanitizer] Don't unpoison buffer in getpw/getgr functions ClosedPublic Authored by vitalybuka on Feb 4 2019, 6:48 PM.
Details Summary Buffer should be referenced by results so used parts will be unpoisoned with unpoison_group and unpoison_passwd. This fixes TSAN performance issue made us to disable this interceptors.
Diff Detail
Event TimelineHerald added subscribers: Restricted Project, krytarowski, kubamracek, srhines. · View Herald Transcript vitalybuka added inline comments. vitalybuka added a child revision: D57786: [sanitizer] Enabled getpw_getgr.cc on iOS.Feb 5 2019, 1:54 PM This revision is now accepted and ready to land.Feb 6 2019, 2:06 PM Closed by commit rL353351: [sanitizer] Don't unpoison buffer in getpw/getgr functions (authored by vitalybuka). · Explain WhyFeb 6 2019, 4:08 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 185357 compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc
compiler-rt/lib/tsan/rtl/tsan_interceptors.cc
compiler-rt/test/sanitizer_common/TestCases/Posix/getpw_getgr.cc
|
This might cause TSan problems if some of these fields point to a static string constant. Let's hope this is not the case.