Commit e1c85e21 authored by Hannes Payer's avatar Hannes Payer Committed by Commit Bot

[heap] Only allow valid inner pointers when calling GcSafeFindCodeForInnerPointer.

Bug: chromium:800251
Change-Id: I9cf94a1e17ca12970b5660f0320c02151d7b79a3
Reviewed-on: https://chromium-review.googlesource.com/856637Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50445}
parent 453d60b1
...@@ -6607,9 +6607,7 @@ Code* Heap::GcSafeFindCodeForInnerPointer(Address inner_pointer) { ...@@ -6607,9 +6607,7 @@ Code* Heap::GcSafeFindCodeForInnerPointer(Address inner_pointer) {
return GcSafeCastToCode(this, large_page->GetObject(), inner_pointer); return GcSafeCastToCode(this, large_page->GetObject(), inner_pointer);
} }
if (!code_space()->Contains(inner_pointer)) { DCHECK(code_space()->Contains(inner_pointer));
return nullptr;
}
// Iterate through the page until we reach the end or find an object starting // Iterate through the page until we reach the end or find an object starting
// after the inner pointer. // after the inner pointer.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment