Stream: git-wasmtime

Topic: wasmtime / issue #6592 Ensure that ArgsAccumulator args m...


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

elliottt opened issue #6592:

Feature

Add a new method to the ArgsAccumulator struct that's specifically for pushing arguments that don't match the formal parameters/return values. Add a flag to ArgsAccumulator that records that if function has been called, and add a debug assertion in ArgsAccumulator::push that the flag is false.

Benefit

This would prevent special args/return values collected during compute_arg_locs from introducing off-by-one errors when generating the args/rets pseudo instructions.

Implementation

The implementation would involve adding the functions and assertions mentioned above, and refactoring the implementations of compute_arg_locs in each backend.

Alternatives

We can continue with things the way they are. This code doesn't change very frequently, so the cost for debugging a problem here is not huge.

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

elliottt labeled issue #6592:

Feature

Add a new method to the ArgsAccumulator struct that's specifically for pushing arguments that don't match the formal parameters/return values. Add a flag to ArgsAccumulator that records that if function has been called, and add a debug assertion in ArgsAccumulator::push that the flag is false.

Benefit

This would prevent special args/return values collected during compute_arg_locs from introducing off-by-one errors when generating the args/rets pseudo instructions.

Implementation

The implementation would involve adding the functions and assertions mentioned above, and refactoring the implementations of compute_arg_locs in each backend.

Alternatives

We can continue with things the way they are. This code doesn't change very frequently, so the cost for debugging a problem here is not huge.

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

elliottt labeled issue #6592:

Feature

Add a new method to the ArgsAccumulator struct that's specifically for pushing arguments that don't match the formal parameters/return values. Add a flag to ArgsAccumulator that records that if function has been called, and add a debug assertion in ArgsAccumulator::push that the flag is false.

Benefit

This would prevent special args/return values collected during compute_arg_locs from introducing off-by-one errors when generating the args/rets pseudo instructions.

Implementation

The implementation would involve adding the functions and assertions mentioned above, and refactoring the implementations of compute_arg_locs in each backend.

Alternatives

We can continue with things the way they are. This code doesn't change very frequently, so the cost for debugging a problem here is not huge.

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

ilikepi63 commented on issue #6592:

Hey, I created this PR with regards to the above issue: https://github.com/bytecodealliance/wasmtime/pull/6613

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

elliottt closed issue #6592:

Feature

Add a new method to the ArgsAccumulator struct that's specifically for pushing arguments that don't match the formal parameters/return values. Add a flag to ArgsAccumulator that records that if function has been called, and add a debug assertion in ArgsAccumulator::push that the flag is false.

Benefit

This would prevent special args/return values collected during compute_arg_locs from introducing off-by-one errors when generating the args/rets pseudo instructions.

Implementation

The implementation would involve adding the functions and assertions mentioned above, and refactoring the implementations of compute_arg_locs in each backend.

Alternatives

We can continue with things the way they are. This code doesn't change very frequently, so the cost for debugging a problem here is not huge.


Last updated: Nov 22 2024 at 17:03 UTC