mirror of
https://github.com/chromium/crashpad.git
synced 2024-12-29 00:32:35 +08:00
Mark Mentovai
f21b740171
asan: Don’t pad the CrashpadInfo struct with a red zone
MachOImageReader::GetCrashpadInfo() expects the CrashpadInfo struct to be the only thing in a __DATA,__crashpad_info section, and enforces this by checking that the section’s size matches the size declared in the struct’s size_ field. Under AddressSanitizer, a red zone follows the structure. While not reflected in the size of the structure, it is reflected in the size of the section, causing MachOImageReader::GetCrashpadInfo() to reject the CrashpadInfo on the assumption that something else is present in the section. By specifying an alignment greater than the minimum red zone size of 32 bytes, red zone generation can be suppressed. TEST=crashpad_snapshot_test BUG=crashpad:44 R=glider@chromium.org, rsesek@chromium.org Review URL: https://codereview.chromium.org/1296523003 .
Description
Languages
C++
92.6%
Objective-C++
2.5%
C
2%
Python
1.7%
Assembly
0.9%
Other
0.3%