matlo607 opened issue #9264:
Question goal
Clarification about the current usage of the DWARF CFI directive
DW_CFA_val_expression
by the project for the purpose of unwinding on AArch64 with Pointer Authentication enabled (i.e.-march=<arch> -mbranch-protection=pac-ret
).References
- #3183 at the origin of the GCC ticket.
- Bug 104689 opened by @akirilov-arm - aarch64: libgcc:
DW_CFA_val_expression
is not supported for RA_SIGN_SATE register- #4195 implemented by @akirilov-arm using
.cfi_window_save
(a.k.a..cfi_negate_ra_state
) instead ofDW_CFA_val_expression
to set the RA state.Details
Today,
DW_CFA_val_expression
is supposedly only used for backtracing in the Cranelift project.
At the end in #4195, @akirilov-arm didn't useDW_CFA_val_expression
to set the RA state register.
The code seems to have evolved since then and moved to https://github.com/bytecodealliance/wasmtime/blob/main/crates/fiber/src/unix/aarch64.rs.
This code uses.cfi_window_save
, so noDW_CFA_val_expression
are emitted.Question
As a conclusion, the project doesn't seem to use the exotic setting of the RA state register that was requested in Bug 104689.
Is my understanding correct ?
Is it an issue for you if GCC's AArch64 backend removes the support for setting the RA state register withDW_CFA_val_expression
?
akirilov-arm commented on issue #9264:
It has been a while since I have worked on Cranelift, but as far as I can tell, the compiler still uses the same DWARF CFI directive when generating function prologues.
The fiber implementation that you have looked at is something completely separate.
Last updated: Nov 22 2024 at 16:03 UTC