Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logging inside WASM module #9

Open
Joffref opened this issue May 28, 2023 · 0 comments
Open

Logging inside WASM module #9

Joffref opened this issue May 28, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@Joffref
Copy link
Owner

Joffref commented May 28, 2023

Expected Behavior

Logging inside WASM module should be exposed to the user instead of panicking.

Actual Behavior

When an error occurs, the WASM module panic and exposes an error like this:

engine_test.go:44: wasm error: unreachable
        wasm stack trace:
        	.rust_panic()
        		0x1dd9d7: /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/panic_abort/src/lib.rs:83:17 (inlined)
        		          /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/panic_abort/src/lib.rs:37:5 (inlined)
        		          /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:744:9
        	._ZN3std9panicking20rust_panic_with_hook17h7f7102b82d51338fE(i32)
        		0xc7c1d: /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:714:5
        	._ZN3std9panicking19begin_panic_handler28_$u7b$$u7b$closure$u7d$$u7d$17hfa40135feb109919E(i32)
        		0x1dda27: /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:583:13
        	._ZN3std10sys_common9backtrace26__rust_end_short_backtrace17haf21bfec9a028e09E(i32)
        		0x1dd9de: /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys_common/backtrace.rs:150:18
        	.rust_begin_unwind(i32)
        		0x185760: /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:579:5
        	._ZN4core9panicking9panic_fmt17he4489d678d6570d5E(i32,i32)
        		0x320: /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/panicking.rs:64:14
        	._ZN4core6result13unwrap_failed17h9c69c0d7a98df92bE(i32,i32,i32,i32,i32)
        		0x2dee8: /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/result.rs:1750:5
        	.is_authorized(i32,i32,i32,i32,i32,i32,i32,i32) i64
      ```
@Joffref Joffref added the enhancement New feature or request label May 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant