Adds stat/__xstat to the common interceptors.
Removes the now-duplicate stat/__xstat interceptor from msan/tsan/esan.
This adds stat/__xstat to asan, which previously did not intercept it.
Differential D19875
[sanitizer] Move stat/__xstat to the common interceptors zhaoqin on May 3 2016, 10:33 AM. Authored by
Details Adds stat/__xstat to the common interceptors. Removes the now-duplicate stat/__xstat interceptor from msan/tsan/esan.
Diff Detail
Event Timeline
Comment Actions It looks like SANITIZER_INTERCEPT___XSTAT is !SANITIZER_INTERCEPT_STAT. This is in line with other common interceptors. Looking at sanitizer_platform_interceptors.h, one can easily figure out which functions are intercepted on any platform.
Comment Actions I do not have the commit right yet. |
The direction of this CL is good. I worry that stat/xstat behavior is not really clear.
Other interceptors (e.g. SANITIZER_INTERCEPT_STRCHR) are completely enabled/disabled by a guard. In this case it is not fully enabled/disabled, but an implementation is switched.
I suggest having two guards: one that turns it on/off, the other one chooses the implementation. WDYT?