-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
armv5te hello world fails to run on qemu and pi3 #46822
Comments
But If you have no |
@Dushistov You are right. I didn't want to mean that strace show the crash place, sorry. |
Running in gdb I get the following backtrace:
Here is the disassemble output of
Here is the disassemble for the working version:
Maybe @jamesmunns can help with this? |
Hey @malbarbo, a bit of quick background information: The I unfortunately am not aware whether non- I also do not know what the issue is here between the different versions of Rust. I am currently running your dockerfile with the I don't think this helps much, but I'll re-read this later when I have more time, and I am happy to explain anything I can. Feel free to re-ping me or ask questions. |
Looks like the problem is the previous code is from libgcc but the new code is from rust-lang/compiler-builtins#115. cc @Amanieu |
I can confirm the
My ARM assembly is a bit weak, so I may not be able to help @Amanieu, but I am happy to test any potential changes on my side (and with my hardware). |
Thanks @jamesmunns and @parched for taking a look at this. |
@jamesmunns Could you try running the program in gdb and disassembling the function in which the crash occurs?
|
This can't be right, can it? |
@parched The |
@parched Actually, you are right, there does seem to be something wrong with the register allocation. I'll look into it. |
Hey @Amanieu, I don't currently have a build for my device that has gdb enabled on that device (I'm not actively working on that device at the moment), do you still need this, or should I wait for the next nightly to come through to test the changes introduced by rust-lang/compiler-builtins#218 ? Let me know, if you still need it, I will set up a new build and image for my device with gdb, etc. |
@jamesmunns You should wait for the next nightly. The previous code was definitely broken. |
Update compiler_builtins Fixes rust-lang#46822 (See rust-lang/compiler-builtins#218)
Should the latest nightly have fixed this (250b492 2017-12-21)? I'm still getting a segfault. |
Nope, it has the old |
Tested the new nightly (5165ee9) in QEMU and on-device. It now successfully prints hello world but segfaults afterwards.
|
Fix argument order for __sync_val_compare_and_swap Fixes rust-lang/rust#46822 (comment)
Update compiler_builtins Fixes #46822 (see rust-lang/compiler-builtins#219)
Running (in qemu and in raspberry pi 3) a hello world binary compiled with xargo and rust nightly-2017-11-16 works as expected. Using rustc nightly-2017-11-17 it segfaults.
Here is a docker file that can be used to reproduce the problem:
According to @Dushistov, the crash happens in
__sync_val_compare_and_swap_4
, but I get other result.Edit: removed the stack trace, it was not helping and it takes to much space.
The text was updated successfully, but these errors were encountered: