Skip to content

Commit b29abbe

Browse files
authored
Fuzzer: Do not error on hashMemory() already existing (#7364)
1 parent 2bddedc commit b29abbe

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/tools/fuzzing/fuzzing.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -1107,8 +1107,9 @@ void TranslateToFuzzReader::addHashMemorySupport() {
11071107
}
11081108
contents.push_back(builder.makeLocalGet(0, Type::i32));
11091109
auto* body = builder.makeBlock(contents);
1110+
auto name = Names::getValidFunctionName(wasm, "hashMemory");
11101111
auto* hasher = wasm.addFunction(builder.makeFunction(
1111-
"hashMemory", Signature(Type::none, Type::i32), {Type::i32}, body));
1112+
name, Signature(Type::none, Type::i32), {Type::i32}, body));
11121113

11131114
if (!preserveImportsAndExports) {
11141115
wasm.addExport(

0 commit comments

Comments
 (0)