Commit 7c7c493c authored by Michael Lippautz's avatar Michael Lippautz Committed by Commit Bot

[heap] Fix cast in FixStaleLeftTrimmedHandlesVisitor

Casting to HeapObject before checking whether the object actually is
a HeapObject is undefined behavior.

Bug: chromium:738743
Change-Id: I7be8dfbc18203c6be008af73549a915f9b6bd3de
Reviewed-on: https://chromium-review.googlesource.com/680768Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48128}
parent 0dffd972
......@@ -4808,8 +4808,8 @@ class FixStaleLeftTrimmedHandlesVisitor : public RootVisitor {
private:
inline void FixHandle(Object** p) {
if (!(*p)->IsHeapObject()) return;
HeapObject* current = reinterpret_cast<HeapObject*>(*p);
if (!current->IsHeapObject()) return;
const MapWord map_word = current->map_word();
if (!map_word.IsForwardingAddress() && current->IsFiller()) {
#ifdef DEBUG
......
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