Commit aa6f40d2 authored by Michael Starzinger's avatar Michael Starzinger Committed by Commit Bot

[wasm] More checking of internal references in {WasmCode}.

R=clemensh@chromium.org

Change-Id: If9cf209b26978ad11dc2cf9c01b92c40bcba1a49
Reviewed-on: https://chromium-review.googlesource.com/1109826
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53931}
parent 11926e6e
......@@ -183,12 +183,16 @@ void WasmCode::Validate() const {
CHECK_EQ(target, code->instruction_start());
break;
}
case RelocInfo::INTERNAL_REFERENCE:
case RelocInfo::INTERNAL_REFERENCE_ENCODED: {
Address target = it.rinfo()->target_internal_reference();
CHECK(contains(target));
break;
}
case RelocInfo::WASM_CODE_TABLE_ENTRY:
case RelocInfo::WASM_CALL:
case RelocInfo::JS_TO_WASM_CALL:
case RelocInfo::EXTERNAL_REFERENCE:
case RelocInfo::INTERNAL_REFERENCE:
case RelocInfo::INTERNAL_REFERENCE_ENCODED:
case RelocInfo::OFF_HEAP_TARGET:
case RelocInfo::COMMENT:
case RelocInfo::CONST_POOL:
......
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