google / gwpsan

GWPSan: Sampling-Based Sanitizer Framework
Apache License 2.0
307 stars 9 forks source link

tsan/test: Only assert expected and real PC are close #5

Closed copybara-service[bot] closed 5 months ago

copybara-service[bot] commented 5 months ago

tsan/test: Only assert expected and real PC are close

Due to various differences in generated code (optimized vs. unoptimized), the memory access may not be the first instruction in the functions we use to derive the expected PC.

Simply check that the expected and real PC are close to each other, currently no more than 32 bytes apart, making this test more robust in optimized and unoptimized builds. Enable it for debug builds as well now.