Fix bug in wasm2c's tail call optimization codegen
The default wasm-rt implementation defines wasm_rt_memcpy as memcpy which expects void*
I'm a little confused -- we pass the tail-call tests, so... this suggests we need some additional testing here. How is this code-path not hit by the current tests?
I guess there are no spec tests for tail-calls that use multi-value? If so that seems like an omission we should fix. @squk , are you up for either:
- adding a test to this repo (of using tail-call with multi-value) that this PR will make green, and/or
- submitting one upstream to the tail-call proposal repo?
If you don't have cycles for this or don't want to, I think we could probably take it from here too, but I'd love to have a test somewhere.
@keithw I don't think I have the cycles for these tests unfortunately. We're not enabling this optimization for a while it seems
We definitely want this fix and thank you for finding and fixing the bug! If you don't have the cycles to improve the testing, as I said we can probably take it from here.