Stream: git-wasmtime

Topic: wasmtime / PR #4657 Remove a layer of recursion in adapte...


view this post on Zulip Wasmtime GitHub notifications bot (Aug 09 2022 at 14:51):

alexcrichton requested fitzgen for a review on PR #4657.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 09 2022 at 14:51):

alexcrichton opened PR #4657 from fix-stack-overflow to main:

In #4640 a feature was added to adapter modules that whenever
translation goes through memory it instead goes through a helper
function as opposed to inlining it directly. The generation of the
helper function happened recursively at compile time, however, and sure
enough oss-fuzz has found an input which blows the host stack at compile
time.

This commit removes the compile-time recursion from the adapter compiler
when translating these helper functions by deferring the translation to
a worklist which is processed after the original function is translated.
This makes the stack-based recursion instead heap-based, removing the
stack overflow.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Aug 09 2022 at 17:58):

fitzgen submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 09 2022 at 17:59):

alexcrichton merged PR #4657.


Last updated: Dec 23 2024 at 13:07 UTC