Skip to content

wasm2js: use scratch memory properly#2033

Merged
kripken merged 22 commits intomasterfrom
wasm2js
Apr 22, 2019
Merged

wasm2js: use scratch memory properly#2033
kripken merged 22 commits intomasterfrom
wasm2js

Conversation

@kripken
Copy link
Copy Markdown
Member

@kripken kripken commented Apr 20, 2019

This replaces all uses of __tempMemory__, the old scratch space location, with calls to function imports for scratch memory access. This lets us then implement those in a way that does not use the same heap as main memory. This avoids possible bugs with scratch memory overwriting something, or just in general that it has observable side effects, which can confuse fuzzing etc.

The intrinsics are currently implemented in the glue. We could perhaps emit them inline instead (but that might limit asm.js optimizations, so I wanted to keep our options open for now - easy to change later).

Also fixes some places where we used 0 as the scratch space address.

@kripken kripken merged commit b99d668 into master Apr 22, 2019
@kripken kripken deleted the wasm2js branch April 22, 2019 16:28
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.

1 participant