Skip to content

Avoid unbounded alloca in FloatParser::ParseFloat - #2754

Merged
sbc100 merged 1 commit into
WebAssembly:mainfrom
aizu-m:literal-float-alloca
Jun 16, 2026
Merged

sbc100 merged 1 commit into
WebAssembly:mainfrom
aizu-m:literal-float-alloca

Conversation

@aizu-m

@aizu-m aizu-m commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

ParseFloat sizes alloca() by the literal length, so a multi-megabyte float constant in untrusted .wat text overflows the stack; use a heap buffer instead.

@sbc100
sbc100 enabled auto-merge (squash) June 2, 2026 17:31
auto-merge was automatically disabled June 15, 2026 18:50

Head branch was pushed to by a user without write access

@aizu-m
aizu-m force-pushed the literal-float-alloca branch from 0afb44a to 95e3712 Compare June 15, 2026 18:50
@aizu-m

aizu-m commented Jun 15, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto main to clear the BEHIND state. The branch had drifted six commits behind since the approval, so the queued merge was sat on the up-to-date check. CI is now running on the new head (95e3712), and the change itself is unchanged from your approval (clean rebase, no conflicts in literal.cc).

One thing worth flagging: updating the branch looks to have dropped the auto-merge that was enabled, so it will likely need re-enabling once the checks go green.

@sbc100 sbc100 changed the title avoid unbounded alloca in FloatParser::ParseFloat Avoid unbounded alloca in FloatParser::ParseFloat Jun 15, 2026
Comment thread src/literal.cc Resolved
@sbc100
sbc100 merged commit 71acc6d into WebAssembly:main Jun 16, 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