>> in that case it crashes here: >> >> if (s->msg_callback) >> s->msg_callback(0, s->version, SSL3_RT_HANDSHAKE, >> s->init_buf->data, (size_t)s->init_num + 4, s, s->msg_callback_arg); >> > > So is the pointer to the callback wrong, or is the SIGSEGV in the > called function?
What happens if you type just 'disass' at debugger prompt. Question is if you see meaningful code at point of failure, at 0x80e130 in original example. If you see meaningful instruction with reference to memory, issue even 'info reg'. If you don't see meaningful code, then it's likely that pointer to callback is wrong. In which case 'print $r10' would print address of failure. $r10 is because we already established that it was called with call *%r10. Basically what is baffling about it is that *if* SEGV is in called function, then stack back-trace would be more meaningful. Normally you see meaningless back-traces when you are in assembly subroutine (because assembly doesn't provide stack unwinding information) or when something went terribly wrong. Assembly is excluded here... If it's callback that crashes, then key question who sets it. Meaningful code at point failure without meaningful back-trace should mean that callback is static and only some function in its vicinity that could have set it. 0x80e130 is not impossible value for application code segment. Yet, it doesn't exclude possibility of something terribly wrong that going wrong. > I searched the cyrus code for _set_msg_callback to find where the function > is registered. But could not find it, which other ssl function could be > used > to register the msg_callback? Is registering the msg_callback mandatory? No. > In which cases would trigger calling the callback? It says above, if callback is set, then it's called. You probably mean "trigger setting the callback". There are no such cases in libssl, not that I know of... > I ask because not > all processes receive a SIGSEGV, and I want to figure out if it will > SIGSEGV every time msg_callback is called, or only in some cases. Examine several core dumps... ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List openssl-dev@openssl.org Automated List Manager majord...@openssl.org