wasm-forge / ic-wasi-polyfill

The polyfill implementation for WASI functions in the IC environment
MIT License
17 stars 4 forks source link

stack overflow only without report_wasi_calls feature #5

Closed lastmjs closed 12 months ago

lastmjs commented 1 year ago

I ran into a very strange problem. I am using the latest commit of ic-wasi-polyfill: 5e986cb3b95a58fbbf9386582f5c48847f22dcca

When I deploy my canister, in this case a Kybra canister using the RustPython library, I always get a [Canister rrkah-fqaaa-aaaaa-aaaaq-cai] Panicked at 'calledResult::unwrap()on anErrvalue: (CanisterError, "Canister rrkah-fqaaa-aaaaa-aaaaq-cai trapped: stack overflow")', src/lib.rs:164:12 (the important part is the stack overflow) in my post_upgrade function.

The post_upgrade function initializes the RustPython VM and does general setup. This function worked just fine before I upgraded to the latest ic-wasm-polyfill commit.

The crazy thing is that when I turn on the report_wasi_calls feature, the stack overflow goes away.

wasm-forge commented 1 year ago

Hi @lastmjs, does this error still exist? Could you give instructions on how to reproduce it?

wasm-forge commented 12 months ago

we'll reopen the issue if it still exists