Skip to content

Commit 3f82ffc

Browse files
authored
Remove incorrect warning when reading name section (#7140)
When we refactored how the name section is read, we accidentally left an old warning about invalid field name indices in place. The old warning code compares the type index from the names section to the size of the parsed type vector to determine if the index is out-of-bounds. Now that we parse the name section before the type section, this is no longer correct. Delete the old warning; we already have a new, correct warning for out-of-bound indices when we parse the type section.
1 parent 06e06ec commit 3f82ffc

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

src/wasm/wasm-binary.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4730,11 +4730,6 @@ void WasmBinaryReader::findAndReadNames() {
47304730
auto numTypes = getU32LEB();
47314731
for (size_t i = 0; i < numTypes; i++) {
47324732
auto typeIndex = getU32LEB();
4733-
bool validType =
4734-
typeIndex < types.size() && types[typeIndex].isStruct();
4735-
if (!validType) {
4736-
std::cerr << "warning: invalid field index in name field section\n";
4737-
}
47384733
auto numFields = getU32LEB();
47394734
NameProcessor processor;
47404735
for (size_t i = 0; i < numFields; i++) {

0 commit comments

Comments
 (0)