Date: Mon, 24 Aug 2015 08:38:19 +0300 From: Solar Designer <solar@...nwall.com> To: john-dev@...ts.openwall.com Subject: Re: Formats using non-SIMD SHA2 implementations On Mon, Aug 24, 2015 at 11:43:50AM +0800, Lei Zhang wrote: > BTW, I encountered an issue testing with OpenMP. I used some stack arrays as vector buffers, but gcc-5 cannot align them properly when OpenMP is enabled (thus giving me segfaults). This seems to be a known issue in some older gcc: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=16660 This isn't OpenMP-related, and it isn't an issue in some older gcc - even though (I am surprised) they're keeping the "bug" open - I guess they're still considering enhancing gcc to deal even with that. The stack is only guaranteed to be 16-byte aligned (and on 32-bit x86 even this wasn't the case until gcc 2.95, and some systems didn't provide this alignment even later). When you use AVX2, you need 32-byte alignment, but you can't reliably have that on the stack (unless you do it on your own: over-allocate space and align the pointer as necessary). > I also used stack arrays as vector buffers in 7z, but somehow it just works fine. Luck. Arguably, that's bad luck (hides a real problem from you). > If this cannot be solved, I could switch to global arrays anyway. This can be worked around in a number of ways. But you really shouldn't expect the system to just do it for you. Alexander
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.