Commit c7be8081 authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

[wasm] Fix DCHECK

The DCHECK is supposed to check that the read in the next line does not
read out of bounds. Hence we have to use {pc} and not {pc_}.
I accidentally triggered this while writing an unrelated test case, but
now fail to reproduce.

R=ahaas@chromium.org

Change-Id: Ia3fa9a9874866dc14180b22b9af526459fbda495
Reviewed-on: https://chromium-review.googlesource.com/568487Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46621}
parent 533f0e3f
......@@ -302,7 +302,7 @@ class Decoder {
const bool at_end = checked && pc >= end_;
byte b = 0;
if (!at_end) {
DCHECK_LT(pc_, end_);
DCHECK_LT(pc, end_);
b = *pc;
TRACE_IF(trace, "%02x ", b);
result = result | ((static_cast<IntType>(b) & 0x7f) << shift);
......
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