mirror of
https://github.com/chromium/crashpad.git
synced 2024-12-27 15:32:10 +08:00
Ben Hamilton
339b125241
[minidump] Fix unaligned pointer in thread name list
https://crrev.com/c/3671775/ introduced a warning (and thus, a compilation failure) on 32-bit ARM when taking the address of the RVA64 field MINIDUMP_THREAD_NAME::RvaOfThreadName: minidump/minidump_thread_name_list_writer.cc:57:23: error: taking address of packed member 'RvaOfThreadName' of class or structure 'MINIDUMP_THREAD_NAME' may result in an unaligned pointer value [-Werror,-Waddress-of-packed-member] name_->RegisterRVA(&thread_name_.RvaOfThreadName); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ Indeed, MINIDUMP_THREAD_NAME's RvaOfThreadName field is not aligned, so the technique used in MinidumpWritable::Register*() of passing in a rawptr to an arbitrary struct field which is later dereferenced cannot be used for this field. This CL replaces the use of MinidumpWritable::Register*() with overriding MinidumpThreadNameWriter::WillWriteAtOffsetImpl() to directly calculate and assign thread_name_.RvaOfThreadName. Change-Id: I71e751a5b5e896b5e7277879bdbdff6e9eefe023 Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3693846 Reviewed-by: Mark Mentovai <mark@chromium.org> Commit-Queue: Ben Hamilton <benhamilton@google.com> Reviewed-by: Ben Hamilton <benhamilton@google.com>
Crashpad
Crashpad is a crash-reporting system.
Documentation
- Project status
- Developing Crashpad: instructions for getting the source code, building, testing, and contributing to the project.
- Crashpad interface documentation
- Crashpad tool man pages
- Crashpad overview design
Source Code
Crashpad’s source code is hosted in a Git repository at https://chromium.googlesource.com/crashpad/crashpad.
Other Links
- Bugs can be reported at the Crashpad issue tracker.
- The Crashpad bots perform automated builds and tests.
- crashpad-dev is the Crashpad developers’ mailing list.
Description
Languages
C++
92.6%
Objective-C++
2.5%
C
2%
Python
1.7%
Assembly
0.9%
Other
0.3%