-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
prevent stripping trailing dot for resolving #3222
Conversation
Test 20 and 1322 both have memory issues reported on travis. One leak, one illegal free. |
@bagder, As I eventually only moved the resolving it seems to me that I am somehow triggering an pre-existing issue. |
You moved where the resolving starts. Most libcurl builds will resolve host name asynchronously so when I don't think we can can use the same strings for both with and without trailing dot purposes unless we're really sure that those buffers won't be needed again in their original pristine versions. |
All right. I will go for a dedicated name for resolving purposes then. |
57c75a5
to
9306efe
Compare
It seems to me that the tests are running into the issue previously found here: |
I can reproduce the issue now in a docker container with ubuntu-14.04 userland. Tracking it down... |
Test 20 fails because of the A mitigation might be to change I did not look into the details for test 1322 yet. (CC: @bagder) |
The reason why this did not happen before is that only some names trigger it when resolving. Two examples:
Test 20 could also be mitigated by removing the trailing dot in |
Test1322 failing is of similar nature. Here the old eglibc-2.19 (ubuntu-14.04 used in travis) is doing free() in an atexit handler and surfaces an invalid free in valgrind. Forcing ipv4 is again a mitigation. Going for a newer userland in travis would prevent this as well. |
f0ae7da
to
77ef92b
Compare
Test 1526 on Visual Studio 12 seems flaky. |
Now a osx clang build failed during build setup. Is there a way to trigger a rebuild without pushing phony commits? |
@bagder all issues addressed. Please let me know if the test mitigation is acceptable. |
Sorry for being slow. Can you please squash this set of commits into just a series of suitable commits without fixups (and force-push)? That simplifies reviewing greatly and is the way we want to merge them anyway! |
6d3df1a
to
715bbf2
Compare
|
@bagder done rebasing/squashing. |
Delays stripping of trailing dots to after resolving the hostname.
The tests 20 and 1322 are using getaddrinfo of libc for resolving. In eglibc-2.19 there is a memory leakage and invalid free bug which surfaces in some special circumstances (PF_UNSPEC hint with invalid or non-existent names). The valgrind runs in testing fail in these situations. As the tests 20/1322 are not specific on either protocol (IPv4/IPv6) this commit changes the hints to IPv4 protocol by passing `--ipv4` flag on the tests' command line. This prevents the valgrind failures.
715bbf2
to
097fa6e
Compare
@bagder ping. Used another rebase for getting a retest. All green now. |
Awesome, thanks for your hard work on this! |
This change removes the stripping of trailing dots in hostnames for the aspect of name resolving.
It does not change hostnames for SNI or http Host header.
This allows using a trailing dot to denote a fully qualified name with DNS.
Fixes: #3022