Stream: git-wasmtime

Topic: wasmtime / PR #4694 Remove recursion building types in `c...


view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2022 at 21:32):

alexcrichton opened PR #4694 from remove-recursion to main:

Sure enough the fuzzers found an input that blows the stack, so the
type-building here was rewritten to use a heap-based stack instead of a
stack-based-stack.

<!--

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 11 2022 at 22:39):

jameysharp created PR review comment:

I can't read this comment. How about "Otherwise emit a reference to the type and remember to generate the corresponding type alias later"?

view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2022 at 22:39):

jameysharp submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2022 at 22:39):

jameysharp created PR review comment:

I guess you might as well consume the vector and drop the partial strings as you go, right?

        for decl in type_decls.into_iter().rev() {

view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2022 at 22:39):

jameysharp created PR review comment:

        // Note that types are printed here in reverse order since they were

view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2022 at 22:39):

jameysharp submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2022 at 22:39):

jameysharp created PR review comment:

I like using #[derive(Default)] for this kind of simple case:

        let mut builder = TypesBuilder::default();

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

alexcrichton updated PR #4694 from remove-recursion to main.

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

alexcrichton has enabled auto merge for PR #4694.

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

alexcrichton merged PR #4694.


Last updated: Nov 22 2024 at 17:03 UTC