Commit d6ab3560 authored by Georg Neis's avatar Georg Neis Committed by V8 LUCI CQ

[compiler] AllocationBuilder: CHECK that allocation size is positive

R=jgruber@chromium.org

Bug: v8:12010
Change-Id: Idb64bd673dd28dd3ef9103efea902413b4de7f67
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3051611Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75909}
parent 621686c1
......@@ -17,6 +17,7 @@ namespace compiler {
void AllocationBuilder::Allocate(int size, AllocationType allocation,
Type type) {
CHECK_GT(size, 0);
DCHECK_LE(size, isolate()->heap()->MaxRegularHeapObjectSize(allocation));
effect_ = graph()->NewNode(
common()->BeginRegion(RegionObservability::kNotObservable), effect_);
......
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