ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl-xml
perl-xml
XML::LibXML failing threads test
by Kurt George Gjerde other posts by this author
Jan 15 2004 1:26PM messages near this date
view in the new Beta List Site
XML::SAX::Writer end_element does not follow SAX2 spec | Re: XML::LibXML failing threads test
Hi,

XML::LibXML fails the thread test below. I get variations of the following:

Free to wrong pool 1c764d0 not 1cc14c8 at E:/usr/site/lib/XML/LibXML.pm 
line 356.
Attempt to free unreferenced scalar: SV 0x1ecdcb0 at 
E:/usr/site/lib/XML/LibXML.pm line 356.
Free to wrong pool 27cb20 not 1cc14c8 at E:/usr/site/lib/XML/LibXML.pm 
line 356.
Free to wrong pool 1db45b0 not 1d4d0d0 at E:/usr/site/lib/XML/LibXML.pm 
line 356.
Attempt to free unreferenced scalar: SV 0x20adc60 at 
E:/usr/site/lib/XML/LibXML.pm line 356.
Free to wrong pool 1cc14c8 not 1d4d0d0 at E:/usr/site/lib/XML/LibXML.pm 
line 356.
Attempt to free unreferenced scalar: SV 0x20adc84 at 
E:/usr/site/lib/XML/LibXML.pm line 356.

Line 356 (354) in LibXML.pm is the call to _parse_string().

This was tested on win32 (XP) using Perl v5.8.2 and XML::LibXML v1.56 
(latest from Randy Kobes' theoryx5).

What's the status of XML::LibXML and threads?
Is this the right list for this kind of issues or are there a dev list 
somewhere?

My motivation for wanting this to work is mod_perl 2.0.


thanks,
-Kurt.


#!/usr/bin/perl
use strict;
use threads;
use XML::LibXML;

my $src = qq(<?xml version="1.0"?> <document><p>Hi!</p></document>);

my $t1 = threads-> new(\&sub1,1);
my $t2 = threads-> new(\&sub1,2);
my $t3 = threads-> new(\&sub1,3);
my $t4 = threads-> new(\&sub1,4);
my $t5 = threads-> new(\&sub1,5);

$t1-> join();
$t2-> join();
$t3-> join();
$t4-> join();
$t5-> join();

sub sub1 {
   my $tid = shift;

   my $parser = XML::LibXML-> new();

   for (1..50) {
     my $doc = $parser-> parse_string($src);
     #print "[$tid]\n".$doc-> toString(1)."\n\n";
   }

}
__END__



-- 
Kurt George Gjerde
kurt.gjerde@[...].no
ICQ:156792385

InterMedia - New Media / Net Based Learning
University of Bergen, Norway

_______________________________________________
Perl-XML mailing list
Perl-XML@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Kurt George Gjerde
Randy Kobes
Kurt George Gjerde
Steve Hay
Randy Kobes
Petr Pajas

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved