Commit f13641d3 authored by Jakob Gruber's avatar Jakob Gruber Committed by Commit Bot

[code] Fix DCHECK in Code::set_cp_offset

Like all metadata areas, the cp offset must be less than the body
size. (In a follow-up, this will change s.t. offsets must be less than
the metadata size.)

Tbr: leszeks@chromium.org
Bug: v8:11036
Change-Id: I108238601f36acd8d22fa161c042d4ca82b07e87
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2501281Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70781}
parent 587f0ec5
......@@ -560,7 +560,7 @@ int Code::constant_pool_offset() const {
void Code::set_constant_pool_offset(int value) {
if (!FLAG_enable_embedded_constant_pool) return;
DCHECK_LE(value, InstructionSize());
DCHECK_LE(value, BodySize());
WriteField<int>(kConstantPoolOffsetOffset, value);
}
......
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