mirror of
https://github.com/chromium/crashpad.git
synced 2024-12-27 23:41:02 +08:00
Increase kAllowedOffset for non-optimized build
"init_stack_vars = true" inserts additional instructions which usually removed by optimization if code does not rely on undefined behaviour of uninitialized variables. However in non-optimized build these instructions may still be present. Fixing https://ci.chromium.org/p/chromium/builders/ci/Win10%20Tests%20x64%20%28dbg%29/12597 Related patch: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1949846 Bug: chromium:1030261 Change-Id: Ib05fa8580d4b0206f70e2dfac5e0f3a3d4389f95 Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1995823 Reviewed-by: Mark Mentovai <mark@chromium.org> Commit-Queue: Vitaly Buka <vitalybuka@chromium.org>
This commit is contained in:
parent
0b8741b074
commit
4367e9df17
@ -102,7 +102,12 @@ class CrashingDelegate : public ExceptionHandlerServer::Delegate {
|
||||
// Verify the exception happened at the expected location with a bit of
|
||||
// slop space to allow for reading the current PC before the exception
|
||||
// happens. See TestCrashingChild().
|
||||
#if !defined(NDEBUG)
|
||||
// Debug build is likely not optimized and contains more instructions.
|
||||
constexpr uint64_t kAllowedOffset = 200;
|
||||
#else
|
||||
constexpr uint64_t kAllowedOffset = 100;
|
||||
#endif
|
||||
EXPECT_GT(snapshot.Exception()->ExceptionAddress(), break_near_);
|
||||
EXPECT_LT(snapshot.Exception()->ExceptionAddress(),
|
||||
break_near_ + kAllowedOffset);
|
||||
@ -215,7 +220,7 @@ class SimulateDelegate : public ExceptionHandlerServer::Delegate {
|
||||
constexpr uint64_t kAllowedOffset = 500;
|
||||
#elif !defined(NDEBUG)
|
||||
// Debug build is likely not optimized and contains more instructions.
|
||||
constexpr uint64_t kAllowedOffset = 150;
|
||||
constexpr uint64_t kAllowedOffset = 200;
|
||||
#else
|
||||
constexpr uint64_t kAllowedOffset = 100;
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user