-
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
Instructions missing from naked_asm blocks. #139407
Comments
cc @folkertdev |
@ZiCog: The code that you shared is identical. I assume you meant to write |
I also can't seem to reproduce the bug on either |
Sorry, you are right, that should be I just did a OS = Sequoia 15.3.1 Problem is still here for me. |
@ZiCog: I'm trying to understand anything about what could be different between my attempt to reproduce the bug here and your setup. Is there anything special about your Is there anything special about your setup? Does it reproduce on a fresh Could you share any other information here? |
I was using the Zed editor and Warp terminal. I have now repeated the experiment with vim and the regular Mac terminal. It turns out that starting with a new project BUT. Then editing that In short. On a fresh project there is no problem. On a "stale" project there is. My Cargo.toml remains as generated:
|
Ah, thanks @ZiCog. Repeating |
I just tried this on an Nvidia Jetson Nano with 2025-04-04 and the problem did not show: $ cat /etc/issue $ uname -a $ rustc --version --verbose |
Is there any way I can get a more recent nightly installed on my Mac Book Pro M1 ? |
You need to remove the
|
I don't believe this has anything to do with My rough explanation for why this occurs is: Session 1 begins
Session 2 begins
Session 3 begins
I can actually reproduce this on linux with |
OK. I now have the most recent nightly installed and it also shows the problem on my Mac M1
How did you get the problem to manifest on Linux ? |
Instructions are getting omitted from naked_asm blocks after fixing a compilation error and then rebuilding with
cargo run
. Acargo clean
andcargo run
is then required to get a correct executable.As a minimal demonstration of this problem this code contains a deliberate error and fails to build:
We fix the source by changing
w1
intox1
. Which now builds without error but produces the wrong result:Looking at the disassembled executable with
objdump -d target/debug/rust_asm | less
we find theadd
instruction is missing from theadd_u64()
function:Rebuilding with
cargo clean
andcargo run
then produces the correct result:And of course the
add
instruction is now in the executable where we expect it to be:Meta
The text was updated successfully, but these errors were encountered: