Skip to content

Don't discard validation failure in wasm2wat --generate-names - #2871

Merged
sbc100 merged 1 commit into
WebAssembly:mainfrom
aizu-m:wasm2wat-generate-names-validation
Oct 5, 2026
Merged

sbc100 merged 1 commit into
WebAssembly:mainfrom
aizu-m:wasm2wat-generate-names-validation

Conversation

@aizu-m

@aizu-m aizu-m commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

ProgramMain in wasm2wat.cc assigns the GenerateNames result over a failed ValidateModule result, so with --generate-names an invalid module is still named, written out and reported with exit code 0, and running the spec suite's assert_invalid modules through the tools showed (global f32 (local.get 0)) crashing in ApplyNames; generate names only once validation has succeeded.

ProgramMain assigned the GenerateNames result over a failed ValidateModule result, so with --generate-names an invalid module was applied names, written out and reported as success. Only generate names once the earlier steps have succeeded.
@sbc100
sbc100 merged commit b835f1c into WebAssembly:main Oct 5, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants