[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Trying to debug segfault
[Thread Prev] | [Thread Next]
- Subject: Re: Trying to debug segfault
- From: Andreas Schneider <asn@xxxxxxxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Fri, 26 Jan 2018 18:20:17 +0100
- To: libssh@xxxxxxxxxx
On Thursday, 25 January 2018 19:35:57 CET Orion Poplawski wrote:
> On 01/25/2018 10:57 AM, Orion Poplawski wrote:
> > I'm trying to debug a segfault in libssh used by x2goclient.
>
> The actual segfault I'm seeing is here:
>
> 2018/01/25 11:29:49.974392, 3] ssh_socket_unbuffered_write: Enabling
> POLLOUT for socket
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x00007ffff7180f5b in ssh_poll_set_events (p=0x7fffdc00c1a0, events=4)
> at /usr/src/debug/master/src/poll.c:349
> 349 p->ctx->pollfds[p->x.idx].events = events;
> (gdb) print *p
> $1 = {ctx = 0x7fffdc00e410, session = 0x7fffdc003190, x = {fd = 18, idx =
> 18}, events = 4,
> lock = 0, cb = 0x7ffff7184700 <ssh_socket_pollcallback>, cb_data =
> 0x7fffdc003ae0}
> (gdb) print *p->ctx
> $2 = {pollptrs = 0x4d70aaec309957, pollfds = 0x45, polls_allocated =
> 140736884427952,
> polls_used = 0, chunk_size = 20}
>
> So pollfds is obviously not a valid pointer here.
break at the return of ssh_poll_ctx_new() and set a write watchpoint on the
ctx pointer.
--
Andreas Schneider GPG-ID: CC014E3D
www.cryptomilk.org asn@xxxxxxxxxxxxxx
| Trying to debug segfault | Orion Poplawski <orion@xxxxxxxx> |
| Re: Trying to debug segfault | Orion Poplawski <orion@xxxxxxxx> |