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

Use "C-unwind" API in our vtable #6930

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Use "C-unwind" API in our vtable #6930

wants to merge 1 commit into from

Conversation

ogoffart
Copy link
Member

When using rust, allow panics to cross the boundaries of our vtable traits. This avoids panic producing two backtrace with panic=unwind

This patch doesn't touch the ABI of out FFI interface, they stay extern "C", because if a panic or exception crosses these boundaries, we are in trouble. (Also, we have a panic=abort in our Cargo.toml anyway)

When using rust, allow panics to cross the boundaries of our vtable traits.
This avoids panic producing two backtrace with panic=unwind

This patch doesn't touch the ABI of out FFI interface, they stay extern "C", because
if a panic or exception crosses these boundaries, we are in trouble.
(Also, we have a panic=abort in our Cargo.toml anyway)
@ogoffart ogoffart requested a review from tronical November 27, 2024 13:27
@ogoffart
Copy link
Member Author

ogoffart commented Nov 27, 2024

Looks like this causes problem with wasm:

error: failed getting Wasm module for '/home/runner/work/slint/slint/target/wasm32-unknown-unknown/release/slint_wasm_interpreter.wasm'

Caused by:
    0: failed to parse input as wasm
    1: failed to parse code section
    2: exceptions support is not enabled (at offset 0xbd231)
Error: Running the wasm-bindgen CLI
Caused by: Running the wasm-bindgen CLI
Caused by: failed to execute `wasm-bindgen`: exited with exit status: 1
  full command: "/home/runner/.cache/.wasm-pack/wasm-bindgen-46a41f966b4cfc69/wasm-bindgen" "/home/runner/work/slint/slint/target/wasm32-unknown-unknown/release/slint_wasm_interpreter.wasm" "--out-dir" "/home/runner/work/slint/slint/api/wasm-interpreter/pkg" "--typescript" "--target" "web"

(same error for all wasm builds)

2: exceptions support is not enabled (at offset 0xbd231)

Maybe we need to enable them somehow?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants