-
Notifications
You must be signed in to change notification settings - Fork 141
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
Fixed-width hexadecimal encodings perform unaligned writes #184
Comments
There's certainly merit in having additional aligned-write codepaths for platforms which may run into unalignment-faults which can either crash the process as you suggest or suffer a significant performance penalty. I do recall that Duncan has been suggesting for quite some time for GHC to be taught about having more primitives in its APIs dealing with unaligned/aligned writes more explicitly. |
ghc-prim already provides primitives for unaligned writes, both to Addr# and the ByteArray#. So, nothing new is needed there. I can prepare something to address this issue. |
#133 seems somewhat related, since it's also about unaligned writes. |
@andrewthad a patch would be highly appreciated, especially considering an advent of Apple M1. |
Given that all our CI builds, including ARM both 32 and 64 bits, work fine, I'd like to close this, unless there is a reproducible evidence of the issue. |
I looked at the code again. I had misread when I originally opened this issue. I do not believe this is actually a problem. Closing. |
word8FixedHex
and friends perform unaligned writes to their buffer. While this is fine on x86, I believe this would cause crashes on ARM.The text was updated successfully, but these errors were encountered: