Commit 52167917 authored by Maria Tîmbur's avatar Maria Tîmbur Committed by V8 LUCI CQ

[fuzzer] Use recursion scope only for nullable references in GenerateRef

Use recursion scope only for nullable references in the
GenerateRef function. We declare the recursion scope as
an optional and only initialize it if the reference type
is nullable.

Bug: v8:11954, chromium:1270126
Change-Id: I1548290cc9d48167f6fd56ff653744d472f65635
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3284894Reviewed-by: 's avatarThibaud Michaud <thibaudm@chromium.org>
Reviewed-by: 's avatarManos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Maria Tîmbur <mtimbur@google.com>
Cr-Commit-Position: refs/heads/main@{#77943}
parent a533662e
......@@ -2065,7 +2065,11 @@ void WasmGenerator::Generate(ValueType type, DataRange* data) {
void WasmGenerator::GenerateRef(HeapType type, DataRange* data,
Nullability nullability) {
GeneratorRecursionScope rec_scope(this);
base::Optional<GeneratorRecursionScope> rec_scope;
if (nullability) {
rec_scope.emplace(this);
}
if (recursion_limit_reached() || data->size() == 0) {
if (nullability == kNullable) {
ref_null(type, data);
......
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