Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Fixing 2176 #2177
These patches solve the problem of launching the test correctly, but do not address the memory access violations that occur. These could be merged in, independently of the greater fix.
I do not know how to progress with the sanitizer errors and double deletions mentioned in #2176
2 times, most recently
May 23, 2016
The ipv6 comparison is actually just comparing strings. the correct fix would be to convert them back into ipv6 addresses and compare the binary versions. I implemented this, but the fix was specific for ipv6 and would fail for ipv4, so we need to check what type of addresses they are first and convert them accordingly. Since the underlying address objects that provided the strings must be available somewhere, I decided not to spend time on this and just comment the checks out. As you mentioned, they have never triggered until now and are not serving any useful purpose.
@hkaiser I have added a cleanup_ip_address function that takes a string containing an ipv4 or ipv6 address and attempts to convert it into a "standardized" address string. It's a bit of a waste of CPU, but it is only called in Debug mode. I hope that addresses your concerns.
@hkaiser I realized that the inet_xxx functions would not compile under windows, so I have added a couple of (untested) snippets I found on stack overflow. I'm on the train and my connection is poor - coulf you trigger a windows build of this and I'll check results later.
I spent some time experimenting and have found that on my mac when I have the VPN to the office open, I get ipv6 addresses that are incorrectly compared by the current code - and this causes the test to fail.
but when I use the boost asio functions, I get
So I am leaving the linux inet_pton functions in, but using the boost asio functions for windows and have added a comment in the source code pointing to this #issue in the event that anyone ever find a problem on windows with ipv6 addresses and looks at it.
In summary : without these patches, the test fails for me on OSX (when the VPN is used and we have an ipv6 address) . With them it passes.