[bug] using windows system libxml 2.9.12 segfaults on exit #2241
Please describe the bug
When Appveyor and Github Actions upgraded their system libraries to libxml 2.9.12, the tests started segfaulting on exit.
Note specifically that the same version of Nokogiri running against system libxml 2.9.10 does not do this; nor does Nokogiri running against packaged libxml 2.9.12.
There were some changes introduced into libxml 2.9.11/12 related to cleanup of windows DLLs at unload/exit time, which seem likely to be contributing causes here. Relevant links:
The text was updated successfully, but these errors were encountered:
…to-work-with-system-libxml-2_9_12 test: adjust tests to pass on system libxml2 >= 2.9.11, and work around windows dll unloading issue --- **What problem is this PR intended to solve?** Adjust tests to pass on system libxml2 >= 2.9.11, because the comment parsing improvement was merged upstream. See https://gitlab.gnome.org/GNOME/libxml2/-/merge_requests/82 for context (and the recently removed `htmlParseComment` patch). This will allow us to run tests regularly against upstream master. Also, work around the libxml2 issue described in #2241 by having libxml2 use its default memory management on windows when system libraries are being used. Note that this also introduces a new value into `Nokogiri::VERSION_INFO`, which is "libxml → memory_management", and the value will be either "ruby" or "default".