Bug 175819 - Support for ipv6 socket reporting with --track-fds
Summary: Support for ipv6 socket reporting with --track-fds
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: 3.3.1
Platform: Gentoo Packages Linux
: NOR wishlist
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-22 02:18 UTC by Roger Light
Modified: 2014-02-24 15:06 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Work-in-progress patch based on dietlibc code (3.56 KB, patch)
2008-12-31 18:17 UTC, Roger Light
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roger Light 2008-11-22 02:18:42 UTC
Version:           3.3.1 (using KDE 3.5.9)
Compiler:          gcc 3.4.6 
OS:                Linux
Installed from:    Gentoo Packages

I'm trying to track down where some sockets are being leaked and reported as:

==31143== Open pf-10 socket 192:
==31143==    <inherited from parent>

Which isn't that useful, unfortunately. Protocol family 10 is AF_INET6 - is there any chance support for providing information on AF_INET6 sockets could be added to coregrind/m_syswrap/syswrap-generic.c:getsockdetails() ?
Comment 1 Julian Seward 2008-12-23 16:22:40 UTC
Possibly hack up a patch yourself and send it?  Personally I have
no understanding of anything but the most basic networking stuff.
Comment 2 Roger Light 2008-12-30 23:41:06 UTC
I had a look at it before and it looks reasonably straightforward. I'll give it a go.
Comment 3 Roger Light 2008-12-31 18:17:41 UTC
Created attachment 29786 [details]
Work-in-progress patch based on dietlibc code

This patch "works for me", but I'm sure it needs tidying up. Let me know what needs to be done.

The bulk of the additional code is taken from dietlibc/libcruft/inet_ntop.c

The ipv6 address compression works, but isn't the best implementation. It'll compress the following (ipv6.google.com):

2001:4860:0000:1001:0000:0000:0000:0068

To this:

2001:4860::1001:0:0:0:68

Whereas ping6 compresses it to:

2001:4860:0:1001::68

I could work up a patch with the glibc equivalent if you'd like.
Comment 4 Mark Wielaard 2014-02-24 11:16:28 UTC
Note that Debian seems to have included this patch. The Debian bug report also contains a test case. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=733119
Comment 5 Tom Hughes 2014-02-24 15:06:49 UTC
Tided up and committed as r13836.