Skip to content
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

Cortex-M build is failing: 0 vs 3 #40

Closed
dtolnay opened this issue Aug 22, 2021 · 5 comments
Closed

Cortex-M build is failing: 0 vs 3 #40

dtolnay opened this issue Aug 22, 2021 · 5 comments
Labels
help wanted Extra attention is needed

Comments

@dtolnay
Copy link
Owner

dtolnay commented Aug 22, 2021

     Running `qemu-system-arm -cpu cortex-m3 -machine lm3s6965evb -nographic -semihosting-config enable=on,target=native -kernel /home/runner/work/linkme/linkme/target/thumbv7m-none-eabi/release/cortex-m-linkme-test`
panicked at 'assertion failed: `(left == right)`
  left: `0`,
 right: `3`', tests/cortex/src/main.rs:25:5

This appears to be a regression from nightly-2021-08-21 to nightly-2021-08-22. A couple older nightlies I spot checked all work, whereas 2021-08-22 fails consistently.

@dtolnay
Copy link
Owner Author

dtolnay commented Aug 22, 2021

Per cargo-bisect-rustc --start 2021-08-21 --end 2021-08-22 --target thumbv7m-none-eabi -- run --release, this bisects to rust-lang/rust#87570.

dtolnay added a commit that referenced this issue Aug 22, 2021
@dtolnay dtolnay added the help wanted Extra attention is needed label Aug 22, 2021
@yfblock
Copy link
Contributor

yfblock commented Oct 25, 2022

I used #[used(linker)] instead of #[used] in the linkme and passed the cortex test. But #![feature(used with arg)] needs to be added to the crate using distributed_slice. I don't know if it is a efficient way.

@dtolnay
Copy link
Owner Author

dtolnay commented Oct 25, 2022

It didn't work when I tried it. The Cortex-M job fails the same way with #[used(linker)] as it does with just #[used]. See #55. @yfblock could you make a PR showing exactly what change you made to make the cortex test succeed?

@yfblock
Copy link
Contributor

yfblock commented Oct 26, 2022

@dtolnay Very strange. I can't reproduce it anywhere else, not just my computer or github CodeSpace. It only seems to happen on github ci.
github_codespace
image

https://github.com/yfblock/linkme/tree/temp

What I did was modify the "memory.x" file according to your pr #55.

@yfblock
Copy link
Contributor

yfblock commented Oct 26, 2022

I try to remove linkme related code from cortex test. But still got errors when pushing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants