mirror of
https://github.com/chromium/crashpad.git
synced 2024-12-27 15:32:10 +08:00
MinidumpCrashpadInfo: the default constructor should zero-initialize.
This regressed in 359bdd86225c when a non-POD UUID data member was added to MinidumpCrashpadInfo, which made MinidumpCrashpadInfo non-POD. This problem seems to have affected MinidumpModuleCodeViewRecordPDB70 since it was added, but it is not likely to have caused any problems there because that structure never appears without having all of its members populated. By comparison, MinidumpCrashpadInfo may be sparsely populated. This caused 4 of the 5 MinidumpCrashpadInfoWriter tests to fail on Windows. TEST=crashpad_minidump_test MinidumpCrashpadInfoWriter.* R=rsesek@chromium.org Review URL: https://codereview.chromium.org/1001683002
This commit is contained in:
parent
359bdd8622
commit
94f7f9eeb2
@ -283,6 +283,16 @@ struct MinidumpModuleCodeViewRecordPDB20 {
|
||||
//! \sa MinidumpModuleCodeViewRecordPDB20
|
||||
//! \sa IMAGE_DEBUG_MISC
|
||||
struct MinidumpModuleCodeViewRecordPDB70 {
|
||||
// UUID has a constructor, which makes it non-POD, which makes this structure
|
||||
// non-POD. In order for the default constructor to zero-initialize other
|
||||
// members, an explicit constructor must be provided.
|
||||
MinidumpModuleCodeViewRecordPDB70()
|
||||
: signature(),
|
||||
uuid(),
|
||||
age(),
|
||||
pdb_name() {
|
||||
}
|
||||
|
||||
//! \brief The magic number identifying this structure version, stored in
|
||||
//! #signature.
|
||||
//!
|
||||
@ -444,6 +454,16 @@ struct ALIGNAS(4) PACKED MinidumpModuleCrashpadInfoList {
|
||||
//! #version, so that newer parsers will be able to determine whether the added
|
||||
//! fields are valid or not.
|
||||
struct ALIGNAS(4) PACKED MinidumpCrashpadInfo {
|
||||
// UUID has a constructor, which makes it non-POD, which makes this structure
|
||||
// non-POD. In order for the default constructor to zero-initialize other
|
||||
// members, an explicit constructor must be provided.
|
||||
MinidumpCrashpadInfo()
|
||||
: version(),
|
||||
client_id(),
|
||||
simple_annotations(),
|
||||
module_list() {
|
||||
}
|
||||
|
||||
//! \brief The structure’s currently-defined version number.
|
||||
//!
|
||||
//! \sa version
|
||||
|
Loading…
x
Reference in New Issue
Block a user