bug in address family checking?

coderman coderman at gmail.com
Tue Dec 23 21:36:30 UTC 2008


On Tue, Dec 23, 2008 at 6:16 AM, Nick Mathewson <nickm at freehaven.net> wrote:
> ... everything
> that calls connection_init() passes it a chunk of RAM that it got from
> tor_malloc_zero, which should also zero out connection->addr, which
> should result in it having addr_family 0, not addr_family 20 (which is
> what the user was seeing on IRC).  Right?

correct.  (there were some other high values set that appeared to be
uninitialized or corrupted a few times as well)


> If this is happening on a edge_connection after it finds a cached dns
> answer, then the addr field has already been changed from its original
> value. Check out the code in dns.c around line 688.

i see that now.  thanks!


> To debug this thing, the easiest solution  is probably to use gdb to
> a stack trace for when the warning message is triggered, to sew where
> exactly it's happening in the code.

sounds good.  that would also allow inspection of values to see if
there is corruption going on or some other issue.

best regards,



More information about the tor-dev mailing list