Skip Menu |
 

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

Report information
The Basics
Id: 117423
Status: new
Priority: 0/
Queue: XML-LibXML

People
Owner: Nobody in particular
Requestors: jkahrman [...] mathworks.com
Cc:
AdminCc:

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



Subject: 'uninitialized value' warning when calling setNamespace passing undef value returned from namespaceURI
Download (untitled) / with headers
text/plain 929b
I'm in the process of updating our perl build (perl 5.8.8 => 5.20; XML::LibXML 1.66 => XML-LibXML-2.0126). Using the newer versions, the attached code 'get_set_namespace' produces a new 'uninitialized value' warning. After some debugging and doing a little research, I think the problem is here: XML-LibXML/perl-libxml-mm.c 1204c1204 < if ( scalar != NULL && scalar != &PL_sv_undef ) { --- Show quoted text
> if ( scalar != NULL && SvOK(scalar) ) {
Basically, in the previous versions, the 'undef' being passed in happens to be the same 'undef' as &PL_sv_undef and is handled without a 'uninitialized value' warning. That appears to no longer be the case. From http://perldoc.perl.org/5.20.2/perlguts.html: "So to repeat always use SvOK() to check whether an sv is defined." Note: I think I've properly connected the dots here, but I've just started poking around in the Perl XS stuff, so I could be way off base.
Subject: get_set_namespace
Download get_set_namespace
application/octet-stream 561b

Message body not shown because it is not plain text.

From: jkahrman [...] mathworks.com
Download (untitled) / with headers
text/plain 1.5k
After further testing, I ran into another 'uninitialized value' warning due to another comparison against &PL_sv_undef instead of using the SvOK macro. Rather than to continue to play wack-a-mole with these warnings, I went through and replaced all comparisons of variables to &PL_sv_undef with the SvOK macro. (See attached combined patch). All the default tests passed, but a sporadic issue I had been experiencing with the thread tests started occurring regularly on Linux and Mac (On Windows, the thread tests consistently stall before and after the patches). # XXX: Linux deadlocks/stalls after reference count warning/segfault?: PmmREFCNT_dec: REFCNT decremented below 0 for 13165c0! at t/90shared_clone_failed_rt_91800.t line 45. *** glibc detected *** perl: corrupted double-linked list: 0x0000000000c1e720 *** # XXX: Sporadic failures on maci PmmREFCNT_dec: REFCNT decremented below 0 for 7f9cd4d001b0! at t/90threads.t line 137. perl5.20.2(71235,0x7fff7c512300) malloc: *** error for object 0x7f9cd4d001b0: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug I think this is the issue reported here: https://rt.cpan.org/Public/Bug/Display.html?id=91800 The change to use SvOK in "void DESTROY( node )" in "XML::LibXML::Node" in LibXML.xs appears to be the one that perturbs things (I suspect the comparison against &PL_sv_undef is masking the underlying issue), but I couldn't narrow down the issue any further. I've just abandoned running the thread tests for now as I don't believe we are using this feature.
Subject: XML-LibXML-2.0126-patch
Download XML-LibXML-2.0126-patch
application/octet-stream 4.6k

Message body not shown because it is not plain text.



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.