On Sun, Dec 15, 2013, Dimitry Andric wrote: > > 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. Thanks for all the replies about this (stack alignment) problem. > 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? Breakpoint 5, sha1_block_data_order_ssse3 () at sha1-x86_64.s:1295 1295 pushq %rbx Current language: auto; currently asm (gdb) p $rsp $15 = (void *) 0x8007360a0 [looks ok] (gdb) n sha1_block_data_order_ssse3 () at sha1-x86_64.s:1296 1296 pushq %rbp (gdb) p $rsp $16 = (void *) 0x800736098 (gdb) n sha1_block_data_order_ssse3 () at sha1-x86_64.s:1297 1297 pushq %r12 (gdb) p $rsp $17 = (void *) 0x800736090 [looks ok again] (gdb) n sha1_block_data_order_ssse3 () at sha1-x86_64.s:1298 1298 leaq -64(%rsp),%rsp (gdb) p $rsp $18 = (void *) 0x800736088 [hmm, now it's wrong?] (gdb) n sha1_block_data_order_ssse3 () at sha1-x86_64.s:1299 1299 movq %rdi,%r8 (gdb) p $rsp $19 = (void *) 0x800736048 [still wrong, stays the same until:] .... (gdb) n 1328 movdqa %xmm0,0(%rsp) (gdb) n Program received signal SIGBUS, Bus error. sha1_block_data_order_ssse3 () at sha1-x86_64.s:1328 (gdb) where #0 sha1_block_data_order_ssse3 () at sha1-x86_64.s:1295 #1 0x000000000045bc68 in SHA1_Final (md=0x8007361d8 "?u??;??Pqs\224??0s?????", c=0x800c39240) at md32_common.h:372 #2 0x0000000000487bb4 in final (ctx=0x8007361a8, md=0x8007361d8 "?u??;??Pqs\224??0s?????") at m_sha1.c:81 #3 0x00000000004800ec in EVP_DigestFinal_ex (ctx=0x8007361a8, md=0x8007361d8 "?u??;??Pqs\224??0s?????", size=0x0) at digest.c:272 #4 0x000000000050e089 in ssleay_rand_add (buf=0x8007362a0, num=8, add=0) at md_rand.c:289 #5 0x000000000047da97 in RAND_add (buf=0x8007362a0, num=8, entropy=0) at rand_lib.c:157 #6 0x000000000040de2b in ssl23_accept (s=0x800c49c00) at s23_srvr.c:155 #7 0x000000000041a384 in SSL_accept (s=0x800c49c00) at ssl_lib.c:940 #8 0x000000000040b2dd in do_tls_operation (fp=<value optimized out>, hsfunc=0x41a350 <SSL_accept>, rfunc=0, wfunc=0, buf=0x0, num=0, bytes=0x8007384a8) at ../../mta/libmta/tlsbio.c:218 #9 0x0000000000405394 in handle_session (srv_socket_index=<value optimized out>, cli_nfd=0x800c06ac0) at ../../../mta/statethreads/examples/smtps2.c:2904 #10 0x0000000000408c43 in handle_connections (arg=0x0) at ../../../mta/statethreads/examples/smtps2.c:1778 #11 0x000000000056e38f in _st_thread_main () at ../../mta/statethreads/sched.c:329 #12 0x000000000056e473 in st_thread_create (start=0x4089e0 <handle_connections>, arg=0x0, joinable=0, stk_size=<value optimized out>) at ../../mta/statethreads/sched.c:593 #13 0x0000000000000000 in ?? () ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List openssl-dev@openssl.org Automated List Manager majord...@openssl.org