I'm getting a frequent (but not always) crash in the engine_table_select() routine at offset +206 (a full stack trace is below) in openssl-0.9.8q (as called by curl-7.21.4) under NetBSD 3.1.1.
I have attempted to line up the C source with the object code as disassembled by GDB, and it appears that the issue is here: trynext: ret = sk_ENGINE_value(fnd->sk, loop++); 0xbd964e70 <engine_table_select+192>: call 0xbd8e993c <sk_ENGINE_value> 0xbd964e75 <engine_table_select+197>: add $0x10,%esp if(!ret) 0xbd964e78 <engine_table_select+200>: test %eax,%eax 0xbd964e7a <engine_table_select+202>: mov %eax,%edi 0xbd964e7c <engine_table_select+204>: je <engine_table_select+134> /* ret is not NULL */ if((ret->funct_ref > 0) || ... 0xbd964e7e <engine_table_select+206>: mov 0x44(%eax),%eax <= SEGV HERE 0xbd964e81 <engine_table_select+209>: test %eax,%eax 0xbd964e83 <engine_table_select+211>: jle <engine_table_select+280> It appears that ret has a value which is not a valid pointer: (gdb) info registers eax eax 0x4040404 67372036 so the attempt to dereference it to get to ret->funct_ref SEGFAULTS. I found one somewhat similar report from many years ago via google, but no answer then. Anyone have any ideas on what might be causing this or how to look further? Thanks, John Full stack trace: #0 0xbd964e7e in engine_table_select () from /usr/lib/libcrypto.so.2 #1 0xbd9462ad in ENGINE_get_default_RAND () from /usr/lib/libcrypto.so.2 #2 0xbd945581 in RAND_get_rand_method () from /usr/lib/libcrypto.so.2 #3 0xbd9456c8 in RAND_add () from /usr/lib/libcrypto.so.2 #4 0xbd8ee237 in RAND_load_file () from /usr/lib/libcrypto.so.2 #5 0xbd89044a in ossl_seed () from /usr/pkg/lib/libcurl.so.4 #6 0xbd890589 in Curl_ossl_seed () from /usr/pkg/lib/libcurl.so.4 #7 0xbd891bb4 in ossl_connect_step1 () from /usr/pkg/lib/libcurl.so.4 #8 0xbd893d32 in ossl_connect_common () from /usr/pkg/lib/libcurl.so.4 #9 0xbd893d87 in Curl_ossl_connect () from /usr/pkg/lib/libcurl.so.4 #10 0xbd8a4ef5 in Curl_ssl_connect () from /usr/pkg/lib/libcurl.so.4 #11 0xbd881c22 in Curl_http_connect () from /usr/pkg/lib/libcurl.so.4 #12 0xbd88d7e4 in Curl_protocol_connect () from /usr/pkg/lib/libcurl.so.4 #13 0xbd88f80c in setup_conn () from /usr/pkg/lib/libcurl.so.4 #14 0xbd88f939 in Curl_connect () from /usr/pkg/lib/libcurl.so.4 #15 0xbd899f31 in connect_host () from /usr/pkg/lib/libcurl.so.4 #16 0xbd89a154 in Curl_do_perform () from /usr/pkg/lib/libcurl.so.4 #17 0xbd89a8f7 in curl_easy_perform () from /usr/pkg/lib/libcurl.so.4 #18 0x080f0843 in do_post () /* my code from here on down */ ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org