mirror of
https://github.com/chromium/crashpad.git
synced 2025-03-09 14:06:33 +00:00
Fix issues revealed by -ftrivial-auto-var-init=pattern
-ftrivial-auto-var-init=pattern automatically initializes all variables with a pattern. This revealed two issues: 1. Unitialized read of field from CrashpadInfoClientOptions. 2. The PC distance check in TestCaptureContext (due to additional instrumentation, the distance is now 76 on x86-64 and 92 on aarch64). Change-Id: I528e5f21c70d2849c9300776da783fde59411e9e Reviewed-on: https://chromium-review.googlesource.com/c/1471691 Reviewed-by: Mark Mentovai <mark@chromium.org> Reviewed-by: Nico Weber <thakis@chromium.org> Commit-Queue: Mark Mentovai <mark@chromium.org>
This commit is contained in:
parent
bba9d0819c
commit
4dbd8c75d5
@ -39,7 +39,8 @@ TriState CrashpadInfoClientOptions::TriStateFromCrashpadInfo(
|
||||
CrashpadInfoClientOptions::CrashpadInfoClientOptions()
|
||||
: crashpad_handler_behavior(TriState::kUnset),
|
||||
system_crash_reporter_forwarding(TriState::kUnset),
|
||||
gather_indirectly_referenced_memory(TriState::kUnset) {
|
||||
gather_indirectly_referenced_memory(TriState::kUnset),
|
||||
indirectly_referenced_memory_cap(0) {
|
||||
}
|
||||
|
||||
} // namespace crashpad
|
||||
|
@ -55,7 +55,7 @@ void TestCaptureContext() {
|
||||
const uintptr_t kReferencePC =
|
||||
reinterpret_cast<uintptr_t>(TestCaptureContext);
|
||||
EXPECT_PRED2([](uintptr_t actual,
|
||||
uintptr_t reference) { return actual - reference < 64u; },
|
||||
uintptr_t reference) { return actual - reference < 128u; },
|
||||
pc,
|
||||
kReferencePC);
|
||||
#endif // !defined(ADDRESS_SANITIZER)
|
||||
|
Loading…
x
Reference in New Issue
Block a user