On 14 Dec 2013, at 17:50, Claus Assmann <[email protected]> wrote: > I'm getting a crash in sha1_block_data_order_ssse3() but currently > I don't know how to debug this further as I'm not very familiar > with the internals... Any suggestions for tracking this down are > appreciated, e.g., is it something in the application or in OpenSSL? ... > Note: this only happens (so far) on *BSD x86_64 (it doesn't crash > on Linux x86_64 which should use the same asm code and of course > the application works fine on other platforms or when OpenSSL is > configured with no-asm). ... > Program received signal SIGBUS, Bus error. > sha1_block_data_order_ssse3 () at sha1-x86_64.s:1328 > 1328 movdqa %xmm0,0(%rsp) ... > rsp 0x800736048 0x800736048
This is most likely a stack alignment problem. The movdqa instruction needs the source or destination to be aligned to 16 bytes, while your stack pointer is aligned to 8 bytes, causing a bus error. I'm not sure how the stack becomes misaligned at this particular point. Normally on x86_64 the ABI always requires 16-byte stack alignment. Can you please try putting a breakpoint on sha1_block_data_order_ssse3, and checking what the value of %rsp is at the start of the function? -Dimitry
signature.asc
Description: Message signed with OpenPGP using GPGMail
