A. H. Zakai
banner
kripken.com
A. H. Zakai
@kripken.com
Software engineer. Loves fantasy novels and Agatha Christie. he/they

Tech: WebAssembly, Emscripten, Binaryen. All opinions here are my own, not my employer's (Google).

More links in: http://kripken.github.io/blog/about/
Ha, yes ...
November 12, 2025 at 10:01 PM
Also 64K
November 10, 2025 at 3:25 PM
Oh, and as one random data point, emcc reduced the stack size by a lot a few years back, making this a lot riskier. We did get an uptick in reports, but quite small

(again, not conclusive, jut saying where my intuition here comes from)
November 9, 2025 at 5:15 PM
Definitely, yeah, most users never report. Most open source users never interact at all with upstream...

Still, while we can't tell the absolute numbers, I hope (but could be wrong!) that the reports we do get, on issue trackers and elsewhere, hint at the relative importance of problems
November 9, 2025 at 5:15 PM
Yeah, good points. I wish this was simpler. Emcc and Rust etc can do stuff like this in their compiler driver logic, but wasi-sdk alone needs another solution...
November 9, 2025 at 5:08 PM
I think if stack overflow problems were a major issue, those things would have been a higher priority.

But also, wasi-sdk is mostly used off the web, where code size matters less, so again I agree with you on the new default, and maybe most wasi-sdk users just don't need anything else, yeah
November 9, 2025 at 3:48 PM
True that while the Binaryen pass can run on wasi-sdk output, it lacks docs, yeah.

But porting sanitizers would not be too hard, I think. Can base off of Emscripten's, and replace/remove the stack trace logic.
November 9, 2025 at 3:48 PM
I didn't mean to equate those, no.

(But I do sort of collect data for both, in that I follow both issue trackers and listen to users of both elsewhere as well.)
November 9, 2025 at 3:43 PM
Given those tools, my sense from user reports is that weird stack-related crashes are not a significant problem

And there are users that do care about every percent of binary size on the web

(though, again, I agree with you on the right defaults here)
November 8, 2025 at 3:49 PM
Fair enough, though I'd say there are good mitigations for those crashes:

1. Stack overflow checks can be added in production: github.com/WebAssembly/...

2. During development there are also sanitizers: emscripten.org/docs/debuggi...
github.com
November 8, 2025 at 3:49 PM
This might be the right default, but it does have a size downside?

If you don't compress LEBs then I guess not, but if you do, it can be significant: some codebases have lots and lots of references to global data, and making those e.g. 3 bytes instead of 2 can add up.
November 8, 2025 at 2:46 AM
Sounds like that was "fun", heh...

I did get lucky here... after getting those huge files, validation checks pointed to the breaking one, and then wasm-reduce quickly found a small testcase. The fix was simple:

github.com/WebAssembly/...
GlobalStructInference: Handle nested optimizable global.gets by kripken · Pull Request #8019 · WebAssembly/binaryen
When we un-nest, temporarily there is a global.get of a global we have not yet created. Mark those so we don't read them and get confused.
github.com
November 4, 2025 at 4:21 PM
good thing storage is measured in TB these days
November 3, 2025 at 9:04 PM
"what if it doesn't continue to get better?" is actually something I am certain is false.

It might approach a limit in theory, but to literally stop, when computers keep getting faster? Almost all cognitive tasks benefit from more resources, more attempts, more effort.
November 2, 2025 at 4:53 AM
+

"Intelligence doesn’t come as a quantity you can just ratchet up and up. Smart people may be brilliant in one area and not in others. Some Nobel Prize winners are really bad at playing the piano or caring for their kids."

Not a *great* rebuttal, ofc
November 2, 2025 at 4:53 AM
Doesn't it rebut it at the very end?

"But set aside the technical objections—what if it doesn't continue to get better?—and you’re left with the claim that intelligence is a commodity you can get more of if you have the right data or compute or neural network. And it’s not."

+
November 2, 2025 at 4:53 AM
Interesting, yeah, that makes sense. So it is not a perfect indicator, but might be a good hint sometimes.
October 31, 2025 at 11:06 PM
...how does it compute "microarchitecture usage", do you know?

(I mean, is it literally how much CPU hardware is used vs idle, or is it comparing vs the theoretical maximum of existing SIMD instructions, etc.?)
October 31, 2025 at 7:41 PM
Docs for wasm-reduce:

github.com/WebAssembly/...
Fuzzing
Optimizer and compiler/toolchain library for WebAssembly - WebAssembly/binaryen
github.com
October 31, 2025 at 7:20 PM