bytecodealliance / wit-bindgen

A language binding generator for WebAssembly interface types
Apache License 2.0
1.03k stars 195 forks source link

[c#] Align lists, free alloc'ed memory before return #1055

Closed yowl closed 2 months ago

yowl commented 2 months ago

This PR fixes the alignment of align 8 list elements. We also now use NativeMemory.AlignedAlloc for the allocation on imports, and fix the free of these allocs to be before the return instead of at the end of the block

jsturtevant commented 2 months ago

would this fix some of the align issues we were having with the tests?

yowl commented 2 months ago

If they are around lists them possibly. I'm not saying I've found all the align errors, but this one manifested with WebGPU. Have we disabled some tests because of alignment issues? If so I can try enabling those.

jsturtevant commented 2 months ago

I was thinking of the variants test but looks like we fixed that a couple months ago https://github.com/bytecodealliance/wit-bindgen/pull/993