Commit e5c37deb authored by Camillo's avatar Camillo Committed by V8 LUCI CQ

[serializer] Skip DCHECK when fuzzing

Bug: chromium:1355059
Change-Id: I0e654660501ed56ad73d76faeb371733de38af2b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3854505
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82697}
parent f0664528
......@@ -1323,7 +1323,10 @@ Maybe<T> ValueDeserializer::ReadVarintLoop() {
value |= static_cast<T>(byte & 0x7F) << shift;
shift += 7;
} else {
DCHECK(!has_another_byte);
// We allow arbitrary data to be deserialized when fuzzing.
// Since {value} is not modified in this branch we can safely skip the
// DCHECK when fuzzing.
DCHECK_IMPLIES(!FLAG_fuzzing, !has_another_byte);
}
position_++;
} while (has_another_byte);
......
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