named.exe crashes when attempting to use a statistics channel
On Windows, trying to fetch any data from a
named instance configured with a
statistics-channel causes a crash. The problem is caused by lack of proper libxml2 initialization and it seems we have been missing some code all along, though for some reason I cannot trigger the bug with older BIND for Windows releases even though
statistics-channel was introduced in 2008 and the lines of libxml2 code which I believe to be the culprit (the ones we are not currently executing in
named while we should) have been added earlier, in 2003. BIND 9.11.4 is the first ISC release where I can trigger the problem, but as there are some further oddities involved1, I lack the time to investigate every bit of this problem in detail, but we are definitely doing something wrong.
BIND 9.11.2 for Windows was built and linked against libxml2 2.9.1, then 9.11.3 moved to 2.9.6, but 9.11.4 reverted to 2.9.1...