Skip Menu |
 

This queue is for tickets about the XML-LibXML CPAN distribution.

Report information
The Basics
Id: 122958
Status: open
Priority: 0/
Queue: XML-LibXML

People
Owner: Nobody in particular
Requestors: dmacks [...] netspace.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



CC:
Subject: libxml2-2.9.5 breaks t/48_reader_undef_warning_on_empty_str_rt106830.t
Date: Tue, 05 Sep 2017 02:19:23 -0400
To: bug-XML-LibXML [...] rt.cpan.org
From: Daniel Macks <dmacks [...] netspace.org>
Download (untitled) / with headers
text/plain 827b
The new version of libxml2 produces a test failure on my OS X 10.11 (Apple's perl-5.18.2). XML-LibXML-2.0129 reports: #&nbsp;&nbsp; Failed test 'xml_reader is undef' #&nbsp;&nbsp; at t/48_reader_undef_warning_on_empty_str_rt106830.t line 33. # Looks like you failed 1 test of 2. t/48_reader_undef_warning_on_empty_str_rt106830.t .. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/2 subtests I think the cause is a libxml2 change in the creation of the parser for a zero-length string. Previously, it short-circuited and treated this case as if a NULL were passed, returning NULL. Now, a parser is created as for any other actual string. The relevant upstream change is probably: https://github.com/GNOME/libxml2/commit/94f6ce838c6a903ef5d0251f061a3af1816b4c50 dan &nbsp; --- Daniel Macks dmacks@netspace.org
From: paul [...] city-fan.org
Download (untitled) / with headers
text/plain 1.2k
On Tue Sep 05 02:40:51 2017, dmacks@netspace.org wrote: Show quoted text
> The new version of libxml2 produces a test failure on my OS X 10.11 > (Apple's perl-5.18.2). XML-LibXML-2.0129 reports: > > #&nbsp;&nbsp; Failed test 'xml_reader is undef' > #&nbsp;&nbsp; at t/48_reader_undef_warning_on_empty_str_rt106830.t > line 33. > # Looks like you failed 1 test of 2. > t/48_reader_undef_warning_on_empty_str_rt106830.t .. > Dubious, test returned 1 (wstat 256, 0x100) > Failed 1/2 subtests > > I think the cause is a libxml2 change in the creation of the parser > for a zero-length string. Previously, it short-circuited and treated > this case as if a NULL were passed, returning NULL. Now, a parser is > created as for any other actual string. The relevant upstream change > is probably: > > https://github.com/GNOME/libxml2/commit/94f6ce838c6a903ef5d0251f061a3af1816b4c50
I'm also seeing a failure in t/32xpc_variables.t: # Failed test ' TODO : Add test name' # at t/32xpc_variables.t line 114. # Looks like you failed 1 test of 35. t/32xpc_variables.t ................................ Dubious, test returned 1 (wstat 256, 0x100) Failed 1/35 subtests Cause is probably similar. This is on Fedora Linux (same on Rawhide and ancient Fedora 13).
From: ppisar [...] redhat.com
Download (untitled) / with headers
text/plain 511b
Dne Út 05.zář.2017 02:40:51, dmacks@netspace.org napsal(a): Show quoted text
> I think the cause is a libxml2 change in the creation of the parser > for a zero-length string. Previously, it short-circuited and treated > this case as if a NULL were passed, returning NULL. Now, a parser is > created as for any other actual string. The relevant upstream change > is probably: > > https://github.com/GNOME/libxml2/commit/94f6ce838c6a903ef5d0251f061a3af1816b4c50 >
I confirm both failures are triggered by this libxml2 commit.
From: ppisar [...] redhat.com
Download (untitled) / with headers
text/plain 1.4k
Dne Čt 07.zář.2017 12:22:01, ppisar napsal(a): Show quoted text
> Dne Út 05.zář.2017 02:40:51, dmacks@netspace.org napsal(a):
> > I think the cause is a libxml2 change in the creation of the parser > > for a zero-length string. Previously, it short-circuited and treated > > this case as if a NULL were passed, returning NULL. Now, a parser is > > created as for any other actual string. The relevant upstream change > > is probably: > > > > https://github.com/GNOME/libxml2/commit/94f6ce838c6a903ef5d0251f061a3af1816b4c50 > >
> I confirm both failures are triggered by this libxml2 commit.
This is not true, I made some mistake. The t/48_reader_undef_warning_on_empty_str_rt106830.t is of course caused by the mentioned 94f6ce838c6a903ef5d0251f061a3af1816b4c50 commit. But the t/32xpc_variables.t failure (no exception after unregistering XPath variables) is caused by commit <https://github.com/GNOME/libxml2/commit/c851970c6ec2166df804b1d551df0998de182fc4>: commit c851970c6ec2166df804b1d551df0998de182fc4 (HEAD, refs/bisect/bad) Author: Nick Wellnhofer <wellnhofer@aevum.de> Date: Sat May 27 15:26:11 2017 +0200 Rework final handling of XPath results Move cleanup of XPath stack to xmlXPathFreeParserContext. This avoids memory leaks if valuePop fails in some error cases. Found with libFuzzer and ASan. Rework handling of the final XPath result object in xmlXPathCompiledEvalInternal and xmlXPathEval to avoid useless error messages.
From: ppisar [...] redhat.com
Dne Čt 07.zář.2017 12:46:18, ppisar napsal(a): Show quoted text
> But the t/32xpc_variables.t failure (no exception after unregistering > XPath variables) is caused by commit > <https://github.com/GNOME/libxml2/commit/c851970c6ec2166df804b1d551df0998de182fc4>: >
I reported it to libxml2 authors <https://bugzilla.gnome.org/show_bug.cgi?id=787941> because I thing this is a regression. The other test failure is just an improvement that XML-LibXML should adapt to, e.g. like this: --- a/t/48_reader_undef_warning_on_empty_str_rt106830.t +++ b/t/48_reader_undef_warning_on_empty_str_rt106830.t @@ -30,9 +30,13 @@ use XML::LibXML::Reader; my $xml_reader = XML::LibXML::Reader->new(string => $empty_xml_doc); # TEST - ok (scalar(!defined($xml_reader)), - 'xml_reader is undef', - ); + SKIP: { + skip 'libxml2 accepts empty strings since 2.9.5 version', 1 + if (XML::LibXML::LIBXML_VERSION() >= 20905); + ok (scalar(!defined($xml_reader)), + 'xml_reader is undef', + ); + } # TEST eq_or_diff(
Download (untitled) / with headers
text/plain 621b
On Wed Sep 20 09:25:51 2017, ppisar wrote: Show quoted text
> Dne Čt 07.zář.2017 12:46:18, ppisar napsal(a):
> > But the t/32xpc_variables.t failure (no exception after unregistering > > XPath variables) is caused by commit > > <https://github.com/GNOME/libxml2/commit/c851970c6ec2166df804b1d551df0998de182fc4>: > >
> > I reported it to libxml2 authors > <https://bugzilla.gnome.org/show_bug.cgi?id=787941> because I thing > this is a regression.
Fixed in libxml2 with https://git.gnome.org/browse/libxml2/commit/?id=3157cf4 Show quoted text
> The other test failure is just an improvement that XML-LibXML should > adapt to, e.g. like this:
Right.
Download (untitled) / with headers
text/plain 12.4k

Message body is not shown because it is too large.

Download (untitled) / with headers
text/plain 12.4k

Message body is not shown because it is too large.



This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.