-
Notifications
You must be signed in to change notification settings - Fork 23
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
Panic while trying to parse header #39
Comments
are you able to share the binary you're trying to load? Or minimal source example+compiler (version)+linker (version) that produces the binary? |
this is the file renamed to .txt for upload but normally it has no file extension at all: |
I tried reproducing with the file above and it seems to work properly:
File loaded:
Current crate versions:
|
I did run into the same issue when using include_bytes! to include the elf. when using e.g. fs::read it seems the resulting vec buffer is aligned to 0x10 so the alignment issue in zero doesnt happen. From a quick test
Im not sure if this is even a bug but the alignment requirement of the slice should probably be documented if it isn't already and i just missed it |
@maddiethecafebabe Thanks for the explanation. I created a PR to provide a proper error instead of panicking #41. |
When trying to create a new ElfFile via
ElfFile::new
a panic occurs:The text was updated successfully, but these errors were encountered: