no_special_abortOnCannotGrowMemory#7911
Conversation
kripken
left a comment
There was a problem hiding this comment.
Nice!
Looks like some tests need updating. lgtm if that's just trivial stuff.
d9ab0fb to
0734f6b
Compare
…e it a regular JS library function
0734f6b to
e07ec77
Compare
|
Note: this changed the signature of to: which is a bit problematic for non-JavaScript host runtimes that verify import/export signatures. |
|
What causes a problem with the change? The signature did change, but unless I did a mistake, all call sites to the function were updated, so call sites + declaration should match? |
|
Non-JavaScript host runtimes have to re-implement exported Emscripten functions, e.g.:
since they cannot import generated JavaScript. But because the signature changed, WASM modules compiled using Emscripten 1.38.26 are trying to import function with a signature that doesn't match the signature in those runtimes. While I understand that this is not exactly your problem, it would be great if Emscripten wasn't introducing breaking changes that are hard to detect and/or recover from, i.e. adding and/or renaming functions is perfectly fine and easy to support (e.g. WAVM/WAVM@69d647e), but changing signatures is a bit more problematic. |
|
Thanks, did not know there was this kind of external use going on. Freezing the signatures of JS functions imported to JS is unfortunately not something that we could make a guarantee about, but I'll keep this use case in mind and go the renaming route whenever possible. |
|
Yeah, I didn't mean freezing / providing stable ABI, but keeping in mind the other implementations. Thanks! |
|
We have an ABI version, added by @rianhunter - I don't think we need to rename things (but we can if there's no reason not to), but we do need to update that metadata version, so that other embedders are not surprised. @juj, please open a PR with an update to @PiotrSikora - sorry for missing this earlier! |
|
Since |
Remove special handling of function abortOnCannotGrowMemory() but make it a regular JS library function.