mirror of
https://github.com/yuzu-emu/breakpad.git
synced 2024-12-23 00:45:35 +00:00
Fix some bugs in CheckMicrodumpContents
The crash address from the microdump was never checked against anything. Instead, the test was checking the value of a constant. On 32-bit systems, an intptr_t cannot represent kCrashAddress (0xDEADDEAD), causing a failure when the crash address is parsed from the microdump. Instead, use uintptr_t, which matches the type of kCrashAddress. Change-Id: Ib5612743803609f7801dcfb98deaa8779e362025 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2100816 Reviewed-by: Mike Frysinger <vapier@chromium.org>
This commit is contained in:
parent
9de167a349
commit
a5fa28ddf0
|
@ -209,14 +209,14 @@ void CheckMicrodumpContents(const string& microdump_content,
|
|||
string token;
|
||||
unsigned crash_reason;
|
||||
string crash_reason_str;
|
||||
intptr_t crash_address;
|
||||
uintptr_t crash_address;
|
||||
crash_reason_tokens.ignore(2); // Ignore the "R " preamble.
|
||||
crash_reason_tokens >> std::hex >> crash_reason >> crash_reason_str >>
|
||||
crash_address;
|
||||
ASSERT_FALSE(crash_reason_tokens.fail());
|
||||
ASSERT_EQ(MD_EXCEPTION_CODE_LIN_DUMP_REQUESTED, crash_reason);
|
||||
ASSERT_EQ("DUMP_REQUESTED", crash_reason_str);
|
||||
ASSERT_EQ(0xDEADDEADu, kCrashAddress);
|
||||
ASSERT_EQ(kCrashAddress, crash_address);
|
||||
did_find_crash_reason = true;
|
||||
} else if (line.find("V ") == 0) {
|
||||
if (expected_info.product_info)
|
||||
|
|
Loading…
Reference in a new issue