This repository has been archived by the owner on Sep 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 139
workaround for alignment issue #108
Comments
Not going to apply this:
|
Hi Vincent, The comment about not checking the return of malloc is fair. As far as not using dynamic memory allocation, how do you want this to work, given that bufsz is variable and external to this function? You don't know how large of a static buffer to put on the stack, and I don't see any way to change the code to ensure alignment of the input on the haskell side. |
jrtc27
added a commit
to jrtc27/cryptonite
that referenced
this issue
Nov 6, 2016
I think without having looked too much at this specific case, would choose the maximum size of bufsz on the stack directly, and copy the unaligned data bufsz by bufsz to it, separeting the case where we can loop on aligned data. |
vorlonofportland
added a commit
to vorlonofportland/cryptonite
that referenced
this issue
Jun 24, 2017
Follow-on to commit ba10930, which implemented a trampoline buffer but then used the unaligned input character array instead. This commit /actually/ fixes haskell-crypto#108, having been tested on an affected architecture :)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: