mirror of
https://github.com/chromium/crashpad.git
synced 2025-03-13 00:41:02 +00:00
asan: Bypass the “nearby PC” check
Under asan, there are many more instructions than without. The “nearby PC” check is much less useful, and would likely fail. TEST=crashpad_client_test CaptureContext.CaptureContext R=rsesek@chromium.org Review URL: https://codereview.chromium.org/1298943003 .
This commit is contained in:
parent
b1d7833600
commit
3b6e5613cb
@ -102,10 +102,14 @@ void TestCaptureContext() {
|
||||
// The program counter reference value is this function’s address. The
|
||||
// captured program counter should be slightly greater than or equal to the
|
||||
// reference program counter.
|
||||
uintptr_t pc = ProgramCounterFromContext(&context_1);
|
||||
#if !__has_feature(address_sanitizer)
|
||||
// AddressSanitizer can cause enough code bloat that the “nearby” check would
|
||||
// likely fail.
|
||||
const uintptr_t kReferencePC =
|
||||
reinterpret_cast<uintptr_t>(TestCaptureContext);
|
||||
uintptr_t pc = ProgramCounterFromContext(&context_1);
|
||||
EXPECT_LT(pc - kReferencePC, 64u);
|
||||
#endif
|
||||
|
||||
// Declare sp and context_2 here because all local variables need to be
|
||||
// declared before computing the stack pointer reference value, so that the
|
||||
|
Loading…
x
Reference in New Issue
Block a user