-
Notifications
You must be signed in to change notification settings - Fork 113
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
dhcpcd crashes with a bus error during startup on sparc64 #430
Comments
By the way, force-aligning the buffer like so makes it work, but I feel like this is more of a workaround than a proper fix:
|
How about moving If that fails, we could malloc and free it I guess which should fix it too. |
This doesn't seem to fix the issue, unfortunately. |
Shame. Does using malloc rather than a buffer on stack fix it? |
Sample log:
GDB backtrace:
System setup:
Gentoo on sparc64 with 6.6.30 Linux kernel, glibc 2.40, dhcpcd 10.1.0, and clang 19.1.4.
A quick look shows that
dhcp_readbpf
creates anuint8_t
buffer which then gets casted into aconst struct ip *
insidechecksums_valid
, butstruct ip
appear to have stronger alignment requirements, so when the pointer is dereferenced it crashes from the misaligned access.The text was updated successfully, but these errors were encountered: