-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
naked_functions: invalid instruction mnemonic <function name> on an .endef line #138320
Copy link
Copy link
Closed
Closed
Copy link
Labels
A-nakedArea: `#[naked]`, prologue and epilogue-free, functions, https://git.io/vAzzSArea: `#[naked]`, prologue and epilogue-free, functions, https://git.io/vAzzSC-bugCategory: This is a bug.Category: This is a bug.F-naked_functions`#![feature(naked_functions)]``#![feature(naked_functions)]`O-windowsOperating system: WindowsOperating system: WindowsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-nakedArea: `#[naked]`, prologue and epilogue-free, functions, https://git.io/vAzzSArea: `#[naked]`, prologue and epilogue-free, functions, https://git.io/vAzzSC-bugCategory: This is a bug.Category: This is a bug.F-naked_functions`#![feature(naked_functions)]``#![feature(naked_functions)]`O-windowsOperating system: WindowsOperating system: WindowsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
On nightly-2024-12-13 and any later version, I'm seeing compile errors in my project. I do not get these errors on previous nightlies. My project only builds for Windows 32-bit (and requires nightly Rust), but I'm seeing this error both on native MSVC and when cross-compiling on Linux with the i686-pc-windows-gnu target. The error message in question looks like this:
No additional information is printed with
RUST_BACKTRACE=1.This error occurs for the following functions on debug and release builds (listing manged function names, links point to relevant source code):
And for the following functions, only on release builds:
All of the above are naked functions. The project contains many other naked functions; I don't know whether these are special or whether it just didn't get to any others. I've tried a blank project with just one naked function, and that compiles without issue.
The date and error message seem to point to #128004 (.endef is generated here), but I'm not familiar enough with the internals to identify what's wrong here.
The issue can be reproduced by cloning https://github.com/GM82Project/gm82save and running
cargo build(with or without--release, specifying--target=i686-pc-windows-gnuif necessary). There's no unusual dependencies.