> We are catching a crash under 32-bit Solaris since splitting sources into > base+simd. After investigation it appears our aligned allocator is _not_ > providing aligned allocations. This makes sense since we are favoring > base+simd. Here's the culprit from secblock.h ( > https://github.com/weidai11/cryptopp/blob/master/secblock.h#L172): > > template <class T, bool T_Align16 = false> > class AllocatorWithCleanup : public AllocatorBase<T> > { > ... > #if CRYPTOPP_BOOL_ALIGN16 > if (T_Align16 && size*sizeof(T) >= 16) > return (pointer)AlignedAllocate(size*sizeof(T)); > #endif > } > > CRYPTOPP_BOOL_ALIGN16 is 0 because we are base, not simd. And a class file > like aria.h does not get -mssse3, so it will never witness > CRYPTOPP_BOOL_ALIGN16 set to 1. However, aria-simd.cpp assumes 16-byte > aligned. > > We did not experience the crash under GCC because its heap allocations are > 16-byte aligned by default. Ditto for Apple and BSDs. We side stepped it by > dumb luck. However, Sun's default alignment is 8. > > To combat this split view of aligned allocations I want to enable > CRYPTOPP_BOOL_ALIGN16 for all i386 and x86_64 builds since its nearly > certain some SSE will be used. >
This was committed at https://github.com/weidai11/cryptopp/commit/97317914d536. CRYPTOPP_DISABLE_ASM can be used to stop the 16-byte alignment of buffers so folks can continue to enjoy their i486's and i586's. Jeff -- -- You received this message because you are subscribed to the "Crypto++ Users" Google Group. To unsubscribe, send an email to cryptopp-users-unsubscr...@googlegroups.com. 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 cryptopp-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.