Quoting Martin Simmons <[email protected]>:
On Thu, 25 Sep 2014 11:24:36 +0200, Michael Menge said:Quoting Andy Polyakov <[email protected]>: >>> 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. > (gdb) disass No function contains program counter for selected frame. (gdb) disass 0x000000000080e130 No function contains specified address. (gdb) print $r10 $1 = 8446256 8446256 = 0x000000000080e130 so the pointer was wrong in the first place, got changed or the function is not there anymoreI suggest you try 'x/16i 0x80e130' as well, because disass can report "No function contains specified address." for an address that has no symbol information, even if it contains code.
(gdb) x/16i 0x80e130 => 0x80e130: loopne 0x80e138 0x80e132: addl $0x0,(%rax) 0x80e138: rclb 0x7e(%rdx) 0x80e13b: add %al,(%rax) 0x80e13d: add %al,(%rax) 0x80e13f: add %dh,%al 0x80e141: push %rdx 0x80e142: jle 0x80e144 0x80e144: add %al,(%rax) 0x80e146: add %al,(%rax) 0x80e148: add %eax,(%rax) 0x80e14a: add %al,(%rax) 0x80e14c: add (%rax),%eax 0x80e14e: add %al,(%rax) 0x80e150: orb $0x0,0x0(%rax,%rax,4) 0x80e158: add %al,(%rax)
You could also try 'info target' to see if gdb associates that address with anything.
(gdb) info target
[...]
0x00000000007a3000 - 0x0000000000825000 is load4
[...]
--------------------------------------------------------------------------------
M.Menge Tel.: (49) 7071/29-70316
Universität Tübingen Fax.: (49) 7071/29-5912
Zentrum für Datenverarbeitung mail:
[email protected]
Wächterstraße 76 72074 Tübingen
smime.p7s
Description: S/MIME Signatur
