-
Notifications
You must be signed in to change notification settings - Fork 247
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
use NativeEndian in symbolize::gimli::Context #373
Conversation
`Object` uses `NativeEndian`, so the `Context` should too. Cc: rust-lang/rust#77410
@@ -5,7 +5,7 @@ | |||
//! intended to wholesale replace the `libbacktrace.rs` implementation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this comment be updated? Isn't gimli the default now? (Not necessary to do here, just wondering.)
I do see big-endian
I used native s390x to confirm the problem and this fix. |
Oh: backtrace-rs/ci/docker/powerpc64-unknown-linux-gnu/Dockerfile Lines 13 to 15 in 2b51e00
|
Thanks! You've confirmed locally this fixes the issue too? I actually thought that ELF was always little-endian for common platforms, regardless of the endianness of the platform itself, but this would make sense why things are broken on big-endian! |
I think that's true for PE but not for ELF. |
On s390x, yes.
AFAIK it's always native in ELF, and from a quick skim of glibc it looks like the loader asserts that they match: Any recollection why that powerpc64 CI has the |
Hmm, then should we make this import part of the platform-specific |
This import seems to only be used for the DWARF, and I don't know what endianness DWARF in PE uses. My intuition is that |
Ok sounds good! I'm gonna go ahead and merge this since it fixes an issue for rust-lang/rust, we can sort out CI afterwards if necessary. PE I think only affects Windows (right?) and while Gimli is used for MinGW targets I don't think that there's any big-endian Windows targets right now.
Ah I'm sure at some point in time in the past it was broken, but it was most likely a bug in qemu. If it works now seems good to uncomment! |
Correct, docs: https://docs.microsoft.com/en-us/cpp/build/arm64-windows-abi-conventions?view=vs-2019#endianness There are no official Rust MinGW ARM targets yet. |
I'm pretty sure arm/aarch64 are little endian... |
…richton Update the backtrace crate to fix big-endian ELF Pulls in rust-lang/backtrace-rs#373. Fixes rust-lang#77410. r? `@alexcrichton`
ARM-the-architecture can go both ways, though its not awfully useful as the ecosystem around it pretty much universally uses LE. Context. |
Object
usesNativeEndian
, so theContext
should too.Cc: rust-lang/rust#77410