Skip to content

[AArch64][ARM] Diagnose musttail in a function that clears its flags - #77

Open
kumarak wants to merge 1 commit into
enforced_secrecy_mainfrom
zeroize-flags-musttail-diagnostic
Open

kumarak wants to merge 1 commit into
enforced_secrecy_mainfrom
zeroize-flags-musttail-diagnostic

Conversation

@kumarak

@kumarak kumarak commented Dec 2, 2026

Copy link
Copy Markdown
Member

A function with "zeroize-flags" returns through its own epilogue, so call lowering refuses every tail call in it. For a musttail call that ended in the generic fatal error and a stack dump. x86 already reports the conflict.

Report it in AArch64 and ARM call lowering and lower an ordinary call, so compilation ends with an error that names the function. AArch64 GlobalISel reports it as well instead of failing to translate the call.

The rule stays in the backends. Splitting an async coroutine that carries "zeroize-flags" produces such a call by design, so the IR verifier cannot reject it.

A function with "zeroize-flags" returns through its own epilogue,
so call lowering refuses every tail call in it. For a musttail
call that ended in the generic fatal error and a stack dump.
x86 already reports the conflict.

Report it in AArch64 and ARM call lowering and lower an ordinary
call, so compilation ends with an error that names the function.
AArch64 GlobalISel reports it as well instead of failing to
translate the call.

The rule stays in the backends. Splitting an async coroutine
that carries "zeroize-flags" produces such a call by design, so
the IR verifier cannot reject it.
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.

1 participant