Skip to content

Tracking Issue for WebAssembly exception handling #118168

Open
@coolreader18

Description

This is a tracking issue for wasm native exception handling, which would allow panic=unwind to function properly for code targeting wasm.

About tracking issues

Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.

Steps

Unresolved Questions

  • -C target-feature=+exception-handling vs -C panic=unwind -- does one imply the other, or is one of them redundant?
    • panic=unwind should enable exception-handling
  • Should -C llvm-args=-wasm-enable-eh be passed by default on all wasm targets, to be stripped out if the exception-handling target feature is disabled?
    • yes: afaict -wasm-enable-eh does not affect codegen in general, only isel for the wasm.throw instruction.
  • Should exception-handling instructions (e.g. from prebuilt libstd) be stripped out if panic=abort? If so, by whom? wasm-ld? wasm-opt does currently implement a --strip-eh pass; maybe that's good enough if users want to target wasm MVP?
    • this problem is similar to the one that atomics (Tracking issue for WebAssembly atomics #77839) faces, of a single prebuilt libstd coming into conflict with some users needing backwards compatibility with wasm-MVP and others wanting to use more recently stabilized features

Implementation history

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFC

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions