Skip to content

Check isBasic() before getBasic() in validator#8157

Merged
kripken merged 3 commits intoWebAssembly:mainfrom
kripken:fix_8097
Jan 5, 2026
Merged

Check isBasic() before getBasic() in validator#8157
kripken merged 3 commits intoWebAssembly:mainfrom
kripken:fix_8097

Conversation

@kripken
Copy link
Copy Markdown
Member

@kripken kripken commented Dec 23, 2025

This avoids asserting.

Fixes #8097

Comment thread src/wasm/wasm-validator.cpp Outdated
const char* text,
Function* func = nullptr) {
if (!ty.isBasic()) {
fail(std::string(text) + " (not basic)", curr, func);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's worth adding more details to the error message here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What detail did you have in mind? Note that text already contains "should be an integer" in all callers, so this just adds a note about basicness.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh wait, I misread your comment... reversed it, in fact 😄

I'll remove the "not basic".

Merge remote-tracking branch 'origin/main' into fix_8097
@kripken kripken enabled auto-merge (squash) January 5, 2026 17:56
@kripken kripken merged commit 17be7b3 into WebAssembly:main Jan 5, 2026
17 checks passed
@kripken kripken deleted the fix_8097 branch January 5, 2026 19:09
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.

[Bug] Assertion failed isBasic() in wasm::Type::getBasic during atomic.cmpxchg validation

2 participants