mirror of
https://github.com/chromium/crashpad.git
synced 2025-03-09 22:26:06 +00:00
Check for empty children after dropping overlapping ranges.
Before this changes, the logic checked for empty children before DropRangesThatOverlapNonOwned in CoalesceOwnedMemory. This could lead to a NULL added to the children vector, which will later lead to a crash. Instead check after drop ranges. Change-Id: If1321ab618bfabf22dfcaea1c643e88771a52dea Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2906378 Commit-Queue: Justin Cohen <justincohen@chromium.org> Reviewed-by: Mark Mentovai <mark@chromium.org>
This commit is contained in:
parent
b2b65a91cf
commit
161a84977b
@ -172,11 +172,11 @@ void MinidumpMemoryListWriter::AddNonOwnedMemory(
|
|||||||
}
|
}
|
||||||
|
|
||||||
void MinidumpMemoryListWriter::CoalesceOwnedMemory() {
|
void MinidumpMemoryListWriter::CoalesceOwnedMemory() {
|
||||||
|
DropRangesThatOverlapNonOwned();
|
||||||
|
|
||||||
if (children_.empty())
|
if (children_.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
DropRangesThatOverlapNonOwned();
|
|
||||||
|
|
||||||
std::sort(children_.begin(),
|
std::sort(children_.begin(),
|
||||||
children_.end(),
|
children_.end(),
|
||||||
[](const std::unique_ptr<SnapshotMinidumpMemoryWriter>& a_ptr,
|
[](const std::unique_ptr<SnapshotMinidumpMemoryWriter>& a_ptr,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user