[PATCH] KExtendedSocket crashes
Adriaan de Groot
adridg at cs.kun.nl
Sat Nov 16 14:42:28 GMT 2002
On Saturday 16 November 2002 13:28, Thiago Macieira wrote:
> Adriaan de Groot wrote:
> >If name resolution fails and sets d->resolution to NULL, lookup()
> >returns as if it did succeed. SO in connect() when "things are a little
> >tricky", using d->resolution->data (kextsock.cpp:1211) crashes.
> >Fix there or in connect()? Or in listen()?
>
> The bug seems to be actually somewhere deeper. lookup() isn't supposed to
> return 0 (success) and not set d->resolution. I can't find the error just
> by looking at the code...
It's hard to track down without taking out your complete network connectivity.
As such it's a real bear to find. I stopped looking when it reached
doLookup().
<diff snipped>
> Please, use unidiffs.
No duh.
> IO_LookupError errors don't keep errno value as their
> second value. Instead, I'd set this to EAI_AGAIN.
OK, will do that. Since it's not documented (well, not in 3.0.4 which is what
I'm looking at), I figured EAGAIN was the nearest thing to being sensible.
> >OK to commit to BRANCH? Useful to commit to HEAD? Bandwidth is a little
> > short here, I can't suck down HEAD to check how things are there.
>
> In HEAD, it's the same thing. I'll commit to HEAD, if you can't do that.
> The same checking could also be added to KExtendedSocket::listen(int)
Will commit to BRANCH and HEAD in connect() and listen() and mark it as FIXME
for later.
> At least in HEAD, all the checks are for != 0. As I wrote in the
> documentation, the return value is non zero for errors, but it can also be
> positive. I had intended to write code to translate the error values from
> getaddrinfo() to our own codes.
OK. Stuff to deal with post-3.1.
More information about the kde-core-devel
mailing list