-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Assertion `MFI.isCalleeSavedInfoValid() && "CalleeSavedInfo not calculated"' failed on AArch64 #75096
Comments
@rustbot ping arm |
Hey ARM Group! This bug has been identified as a good "ARM candidate". cc @JamieCunliffe @joaopaulocarreiro @raw-bin @Stammark @vigoux |
This comment has been minimized.
This comment has been minimized.
The test is causing an infinite loop due to the link register being updated during the call to zzz, that call is causing the link register to be the ret instruction after that call, the ret instruction then returns to the link register causing an infinite loop. Normally before the call the link register would be saved and then restored after the call, however due to this being a naked function that isn't happening. The emitted LLVM IR is just calling the function and that call isn't preserving anything so this could change in a future version of LLVM I suppose. I also suspect it's why this #74847 was raised. I can get the test to pass, but I'm wondering if the test is actually correct in it's current state. EDIT: It's probably worth pointing out that the code in that test will segfault on x86_64 |
The test is definitely incorrect. Using anything other than inline asm in a naked function is UB. |
…ked, r=Amanieu Don't call a function in function-arguments-naked.rs Fixes rust-lang#75096 It's U.B. to use anything other than inline assmebling in a naked function. Fortunately, the `#break` directive works fine without anything in the function body.
The
debuginfo/function-arguments-naked.rs
test is failing on AArch64's CI:The text was updated successfully, but these errors were encountered: