This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: openssl crashes when compiled with 4.0 [was Re: can't compile 4.0 here]
Tommy Vercetti <vercetti@zlew.org> writes:
> More details:
>
> Doing cast cbc for 3s on 8192 size blocks: 17361 cast cbc's in 2.96s
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x00002aaaaad71cf4 in bn_add_words () from /usr/lib64/libcrypto.so.0.9.7
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Did you install the openssl version that you compiled? Or are you simply
running the openssl binary that you compiled without installing? If you
simply are running a binary that you built it may be an incompatibility between
openssl and itself.
> (gdb) bt
> /tmp/openssl-0.9.7e-root-root/usr/include/openssl/pem.h /tmp/openssl-0.9.7e-root-root/usr/include/openssl/rc2.h /tmp/#0
> 0x00002aaaaad71cf4 in bn_add_words () from /usr/lib64/libcrypto.so.0.9.7
> #1 0x00002aaaaad69167 in BN_uadd () from /usr/lib64/libcrypto.so.0.9.7
> #2 0x00002aaaaad708d1 in BN_mod_inverse () from /usr/lib64/libcrypto.so.0.9.7
> #3 0x00002aaaaad7bcf7 in RSA_blinding_on ()
> from /usr/lib64/libcrypto.so.0.9.7
> #4 0x00002aaaaad7a010 in RSA_PKCS1_SSLeay ()
> from /usr/lib64/libcrypto.so.0.9.7
> #5 0x00002aaaaad7a546 in RSA_PKCS1_SSLeay ()
> from /usr/lib64/libcrypto.so.0.9.7
> #6 0x00002aaaaad7c052 in RSA_sign () from /usr/lib64/libcrypto.so.0.9.7
> #7 0x0000000000430b97 in ?? ()
> #8 0x00000000004111c5 in ?? ()
> #9 0x0000000000411816 in ?? ()
> #10 0x00002aaaab058829 in __libc_start_main () from /lib64/tls/libc.so.6
>
> (gdb) disassemble
> Dump of assembler code for function bn_add_words:
> 0x00002aaaaad71ce0 <bn_add_words+0>: xor %r8d,%r8d
> 0x00002aaaaad71ce3 <bn_add_words+3>: test %ecx,%ecx
> 0x00002aaaaad71ce5 <bn_add_words+5>: jle 0x2aaaaad71d0c
> <bn_add_words+44>
> 0x00002aaaaad71ce7 <bn_add_words+7>: mov %rdx,%rax
> 0x00002aaaaad71cea <bn_add_words+10>: sub %rdx,%rdx
> 0x00002aaaaad71ced <bn_add_words+13>: data16
> 0x00002aaaaad71cee <bn_add_words+14>: data16
> 0x00002aaaaad71cef <bn_add_words+15>: nop
> 0x00002aaaaad71cf0 <bn_add_words+16>: mov (%rsi,%rdx,8),%rax
> 0x00002aaaaad71cf4 <bn_add_words+20>: adc (%rdx,%rdx,8),%rax
> 0x00002aaaaad71cf8 <bn_add_words+24>: mov %rax,(%rdi,%rdx,8)
> 0x00002aaaaad71cfc <bn_add_words+28>: lea 0x1(%rdx),%rdx
> 0x00002aaaaad71d00 <bn_add_words+32>: loop 0x2aaaaad71cf0
> <bn_add_words+16>
> 0x00002aaaaad71d02 <bn_add_words+34>: sbb %rax,%rax
> 0x00002aaaaad71d05 <bn_add_words+37>: mov %rax,%r8
> 0x00002aaaaad71d08 <bn_add_words+40>: and $0x1,%r8d
> 0x00002aaaaad71d0c <bn_add_words+44>: mov %r8,%rax
> 0x00002aaaaad71d0f <bn_add_words+47>: retq
> End of assembler dump.
>
>
> Perhaps this might remind you some regression, dunno. Maybe I should fill bug
> against it ?
>
> --
> Vercetti
>
--
Thanks,
Jim
http://www.student.cs.uwaterloo.ca/~ja2morri/
http://phython.blogspot.com
http://open.nit.ca/wiki/?page=jim