Stream: git-wasmtime

Topic: wasmtime / PR #9475 Fix an timeout in fuzzing


view this post on Zulip Wasmtime GitHub notifications bot (Oct 16 2024 at 06:35):

alexcrichton opened PR #9475 from alexcrichton:fix-timeout to bytecodealliance:main:

This commit fixes a timeout that was found by OSS-Fuzz recently where a module was calling memory.grow many times, presumably in a loop, with a modest amount each time. This meant that memory.grow was taking, in total, a quadratic amount of time because Wasmtime was configured with dynamic memories and no memory was reserved for growth. That in turn meant that the test case eventually timed out due to this quadratic behavior.

To fix this in addition to the memory allocation cap that we already track a new cap for the number of times memories/tables can be grown was also added. Any growth beyond this limit is rejected and helps prevent this quadratic behavior.

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Oct 16 2024 at 06:35):

alexcrichton requested fitzgen for a review on PR #9475.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 16 2024 at 06:35):

alexcrichton requested wasmtime-fuzz-reviewers for a review on PR #9475.


Last updated: Nov 22 2024 at 17:03 UTC