Skip to content

Commit 6f1b6b6

Browse files
Nikolas KaipelV8 LUCI CQ
authored andcommitted
[wasm][fuzzer] add missing comparison of stringrefs to differential fuzzing
The comparison of global variable values for the differential fuzzing was missing a comparison for string refs. Bug: 443362696 Change-Id: I20c86807777995372c827f13206725e5c48cb684 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6934785 Reviewed-by: Jakob Kummerow <[email protected]> Commit-Queue: Nikolas Kaipel <[email protected]> Reviewed-by: Matthias Liedtke <[email protected]> Cr-Commit-Position: refs/heads/main@{#102379}
1 parent bfbbaaa commit 6f1b6b6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/fuzzer/wasm/fuzzer-common.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,13 +210,18 @@ bool ValuesEquivalent(const WasmValue& init_lhs, const WasmValue& init_rhs,
210210
case HeapType::kEq:
211211
case HeapType::kArray:
212212
case HeapType::kStruct:
213+
case HeapType::kString:
213214
if (IsNull(lhs_ref) || IsWasmNull(lhs_ref)) break;
214215
if (IsWasmStruct(lhs_ref)) {
215216
if (!CheckStruct(lhs_ref, rhs_ref)) return false;
216217
} else if (IsWasmArray(lhs_ref)) {
217218
if (!CheckArray(lhs_ref, rhs_ref)) return false;
218219
} else if (IsSmi(lhs_ref)) {
219220
if (lhs_ref != rhs_ref) return false;
221+
} else if (IsString(lhs_ref)) {
222+
Tagged<String> lhs_str = Cast<String>(lhs_ref);
223+
Tagged<String> rhs_str = Cast<String>(rhs_ref);
224+
if (!lhs_str->Equals(rhs_str)) return false;
220225
}
221226
break;
222227
default:

0 commit comments

Comments
 (0)