The line CALL wasi:filesystem/types#descriptor.get-type FD=Static(StaticIndexEntry { name: 0x0, ty: ActiveFile, data: STATIC [0, 0] }) implies the file descriptor is broken at this point. Based on my debugging, it seems like resourceTransferBorrow returns a handle 0x1, but the callee side (wasi-virt) expects it to be a pointer.
I guess resource transferring between the adapter module and wasi-virt does not work
Reproducer
main.virt.wasm.zip
The line
CALL wasi:filesystem/types#descriptor.get-type FD=Static(StaticIndexEntry { name: 0x0, ty: ActiveFile, data: STATIC [0, 0] })
implies the file descriptor is broken at this point. Based on my debugging, it seems likeresourceTransferBorrow
returns a handle 0x1, but the callee side (wasi-virt) expects it to be a pointer.