It might be a clumsy title but looking for some pointers regarding the behavior I'm observing in a filter I'm developing for envoy in Zig. I'm working with a rudimentary implementation of the proxy-wasm spec (0.2.0) for Zig which uses a global variable for keeping the plugin's state. From what I can tell, between calls (host->vm, host is the wasm host, vm is me - the plugin), some state allocated dynamically gets overwritten.
I played around with optimization modes (ReleaseSafe vs Debug) to no avail and with allocators (page_allocator vs wasm_allocator vs arena_allocator (based on either of the former 2 ) also to no avail.
I only found this issue on GH which resembles my behavior but it's not emscripten.
Looking for any hints on how to troubleshoot. Can provide a link to the source if necessary.
Thanks!