Stream: git-wasmtime

Topic: wasmtime / PR #6641 fuzzgen: Generate Tail Calls


view this post on Zulip Wasmtime GitHub notifications bot (Jun 25 2023 at 21:05):

afonso360 opened PR #6641 from afonso360:fuzzgen-tail-calls to bytecodealliance:main:

:wave: Hey,

This PR is a follow up to #6635 and it allows fuzzgen to generate return_call and return_indirect_call instructions. These are modeled as any other control flow instruction however they have a bunch of restrictions before we are actually able to insert them.

I'm opening this as a draft since it has found some issues and I can't run it for too long before it crashes, and I'm not entirely sure it's generating correct code under all inputs. Just leaving this open if anyone wants to test with it (@fitzgen :eyes: ).

view this post on Zulip Wasmtime GitHub notifications bot (Jun 25 2023 at 21:05):

afonso360 requested elliottt for a review on PR #6641.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 25 2023 at 21:05):

afonso360 requested wasmtime-compiler-reviewers for a review on PR #6641.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 25 2023 at 21:05):

afonso360 requested wasmtime-fuzz-reviewers for a review on PR #6641.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 25 2023 at 21:09):

afonso360 edited PR #6641:

:wave: Hey,

This PR is a follow up to #6635 and it allows fuzzgen to generate return_call and return_indirect_call instructions. These are modeled as any other control flow instruction however they have a bunch of restrictions before we are actually able to insert them.

As with the other control flow instructions, we try to include as much info as possible in the CFG before inserting it. It doesn't seem as relevant with tail calls as it is with blocks, but I figured it is still worth it. (The alternative would be to pick the tail call target at instruction insertion time, but I think that would actually make this slightly more complicated)

I'm opening this as a draft since it has found some issues and I can't run it for too long before it crashes, and I'm not entirely sure it's generating correct code under all inputs. Just leaving this open if anyone wants to test with it (@fitzgen :eyes: ).

view this post on Zulip Wasmtime GitHub notifications bot (Jun 26 2023 at 07:06):

elliottt requested fitzgen for a review on PR #6641.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 27 2023 at 18:55):

afonso360 updated PR #6641.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 27 2023 at 22:19):

afonso360 updated PR #6641.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 27 2023 at 22:19):

afonso360 has marked PR #6641 as ready for review.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 29 2023 at 15:25):

fitzgen submitted PR review:

Looks great! Thanks a ton!

view this post on Zulip Wasmtime GitHub notifications bot (Jun 29 2023 at 15:25):

fitzgen submitted PR review:

Looks great! Thanks a ton!

view this post on Zulip Wasmtime GitHub notifications bot (Jun 29 2023 at 15:25):

fitzgen created PR review comment:

Can we maybe factor this out to a helper that checks cfg!(target_pointer_width = "64") and then has an else that panics with a helpful message? Just to future proof this a little bit.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 29 2023 at 17:01):

afonso360 updated PR #6641.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 29 2023 at 17:02):

afonso360 created PR review comment:

Turns out we can already query the ISA's pointer type directly, so I've done just that.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 29 2023 at 17:04):

fitzgen has enabled auto merge for PR #6641.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 29 2023 at 19:17):

afonso360 merged PR #6641.


Last updated: Nov 22 2024 at 16:03 UTC