Commits

Nick Wellnhofer  committed d3391f7

Skip t/40reader_mem_error.t with libxml2 < 2.7.4

The failure is probably due to a known double-free bug in libxml2.

https://rt.cpan.org/Ticket/Display.html?id=84564
https://bugzilla.gnome.org/show_bug.cgi?id=447899

  • Participants
  • Parent commits eb306f9
  • Branches rt84564

Comments (0)

Files changed (2)

 Revision history for Perl extension XML::LibXML
 
 Not yet released
+    - Skip t/40reader_mem_error.t with libxml2 < 2.7.4
+      The failure is probably due to a known double-free bug.
+        - https://rt.cpan.org/Ticket/Display.html?id=84564
+        - https://bugzilla.gnome.org/show_bug.cgi?id=447899
     - Die if a file handle with an encoding layer returns more bytes
       than requested in parse_fh.
         - https://rt.cpan.org/Ticket/Display.html?id=78448

File t/40reader_mem_error.t

     return $comparator->compare();
 }
 
-1;
-
 my $xml_source = <<'EOF';
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 </html>
 EOF
 
-my @common = (validation => 0, load_ext_dtd => 0, no_network => 1);
-# TEST
-Test::XML::Ordered::is_xml_ordered(
-    [ string => $final_source, @common,],
-    [ string => $xml_source, @common,],
-    "foo",
-);
+SKIP: {
+    # RT #84564
+    # https://bugzilla.gnome.org/show_bug.cgi?id=447899
+    if (XML::LibXML::LIBXML_RUNTIME_VERSION() < 20704) {
+        skip('Known double-free with libxml2 < 2.7.4', 1);
+    }
+
+    my @common = (validation => 0, load_ext_dtd => 0, no_network => 1);
+    # TEST
+    Test::XML::Ordered::is_xml_ordered(
+        [ string => $final_source, @common,],
+        [ string => $xml_source, @common,],
+        "foo",
+    );
+}
 
 # TEST
 ok (1, "Finished");