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

Tracking Issue for asm_unwind #93334

Open
Amanieu opened this issue Jan 26, 2022 · 2 comments
Open

Tracking Issue for asm_unwind #93334

Amanieu opened this issue Jan 26, 2022 · 2 comments
Labels
A-inline-assembly Area: Inline assembly (`asm!(…)`) B-unstable Blocker: Implemented in the nightly compiler and unstable. C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. F-asm `#![feature(asm)]` (not `llvm_asm`)

Comments

@Amanieu
Copy link
Member

Amanieu commented Jan 26, 2022

The feature gate for the issue is #![feature(asm_unwind)].

Summary

This feature adds a may_unwind option to asm! which allows an asm block to unwind stack and be part of the stack unwinding process. This option is only supported by the LLVM backend right now.

Status

Blocked on the stabilization of extern "C-unwind" (#74990).

Also it is uncertain whether this can be supported directly by non-LLVM backends. It is possible to support by outlining the assembly code to a separate function and calling it.

@Amanieu Amanieu added A-inline-assembly Area: Inline assembly (`asm!(…)`) B-unstable Blocker: Implemented in the nightly compiler and unstable. C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. F-asm `#![feature(asm)]` (not `llvm_asm`) labels Jan 26, 2022
@bstrie
Copy link
Contributor

bstrie commented Jul 1, 2024

Note that extern "C-unwind" has been stabilized as of #116088 . Are there any remaining blockers for this feature?

@Amanieu
Copy link
Member Author

Amanieu commented Jul 2, 2024

I'm having crashes in corosensei when using this feature which I've tracked down to LLVM's register allocator not handling unwinding from inline assembly correctly. However I have not been able to extract a minimal reproducer, and even extracting the LLVM IR and compiling it manually with llc fails to reproduce the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-inline-assembly Area: Inline assembly (`asm!(…)`) B-unstable Blocker: Implemented in the nightly compiler and unstable. C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. F-asm `#![feature(asm)]` (not `llvm_asm`)
Projects
None yet
Development

No branches or pull requests

2 participants