On Sunday, July 12, 2015 at 11:49:54 PM UTC-4, Jeffrey Walton wrote:
>
> On Sun, Jul 12, 2015 at 11:41 PM, Mobile Mouse wrote:
> > Your patch works. Compiled with GCC-5.1 (macports version, in turn built
> by
> > Xcode-6.4 on Yosemite), "cryptest.exe v” now succeeds.
> >
>
> Yeah, at -O3, GCC uses SSE instructions and vectorizes the XOR. The
> vectoriztion includes vmovdqu, vinsertf128, vmovdqa, and vxorps.
>
> The problem appears to be, vmovdqa has a 128-bit alignment
> requirement, but the code only provides a 64-bit alignment guarantee.
>
> I'm researching how we can make it play well with GCC now and moving
> forward.
>
This is a somewhat unsettling sign... Under Clang, I'm getting the
following from the Undefined Behavior sanitizer.
The word64 issues refer to:
((word64*)buf)[i] ^= ((word64*)mask)[i];
The word32 issues refer to:
((word32*)buf)[i] ^= ((word32*)mask)[i];
********
.misc.cpp:31:26: runtime error: load of misaligned address 0x7ffcc0a2ba5f
for type 'word64' (aka 'unsigned long long'), which requires 8 byte
alignment
0x7ffcc0a2ba5f: note: pointer points here
2b a8 e1 08 54 68 65 20 71 75 69 63 6b 20 62 72 6f 77 6e 20 66 6f 78 20
6a 75 6d 70 73 20 6f 76
^
.misc.cpp:40:25: runtime error: load of misaligned address 0x7ffcc0a2ba7d
for type 'word32' (aka 'unsigned int'), which requires 4 byte alignment
0x7ffcc0a2ba7d: note: pointer points here
61 7a 79 20 64 6f 67 2e 20 6c 61 7a 79 20 64 6f 67 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
^
...misc.cpp:31:5: runtime error: store to misaligned address 0x000003d5dc3a
for type 'word64' (aka 'unsigned long long'), which requires 8 byte
alignment
0x000003d5dc3a: note: pointer points here
6e 6f 69 6a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
^
misc.cpp:40:4: runtime error: store to misaligned address 0x000003d5dc5a
for type 'word32' (aka 'unsigned int'), which requires 4 byte alignment
0x000003d5dc5a: note: pointer points here
72 73 6d 6e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
--
--
You received this message because you are subscribed to the "Crypto++ Users"
Google Group.
To unsubscribe, send an email to [email protected].
More information about Crypto++ and this group is available at
http://www.cryptopp.com.
---
You received this message because you are subscribed to the Google Groups
"Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.