Repository navigation
A real trap of the vector tiles module in the worker test, the sources of the reset-state flag where it is used - #631
Merged
Conversation
…s of the reset-state flag where it is used The test overwrote nothing and handed recoverFromTrap a RuntimeError made by hand. It now fills the module's memory so that its allocator traps on the next tile copied in, checks that recoverFromTrap takes that trap, that the module has a new memory afterwards, and that the worker reads the next tile with it. The build script, recoverFromTrap's doc and the dependabot note say where --experimental-reset-state-function comes from and why wasm-bindgen stays pinned.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The worker test of the vector tiles module's trap recovery handed
recoverFromTrapaRuntimeErrormade by hand. It now makes the real module trap: it fills the module's memory so that its allocator traps on the next tile copied in (RuntimeError: Out of bounds memory access), as a bug writing past a buffer would. No export of the module panics on bad input, so this needs no test-only export and no product code. The test checks that:WebAssembly.RuntimeErrorfrom the module;recoverFromTraptakes it, and warns once;WebAssembly.Memoryafterwards (its instance made again);Error(a malformed tile) is not taken for a trap;The build script,
recoverFromTrap's doc and the dependabot note now say where wasm-bindgen's--experimental-reset-state-functioncomes from and why wasm-bindgen stays pinned:--target webby Suppot --experimental-reset-state-function on more targets wasm-bindgen/wasm-bindgen#4909=0.2.129) and left out of dependabot, and its documentation is read again when it is raised by hand.Test and comments only: no change of behaviour, no CHANGELOG entry, no performance measurement.