Skip Menu |
 

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

Report information
The Basics
Id: 17500
Status: resolved
Priority: 0/
Queue: XML-Twig

People
Owner: Nobody in particular
Requestors: Nikolaus [...] rath.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 3.17
Fixed in: 3.24



Subject: *** glibc detected *** double free or corruption (!prev): 0x08d2b4d0 ***
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
X-RT-Original-Encoding: utf-8
Content-Type: multipart/mixed; boundary="----------=_1139209590-24388-2"
Content-Length: 0
Content-Type: text/plain; charset="utf8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
Content-Length: 787
Download (untitled) / with headers
text/plain 787b
Hello, It seems that XML::Twig causes some sort of segfault for the attached file: main::update(./verify.pl:86): eval { DB<2> n main::update(./verify.pl:87): my($fh,$parser); DB<2> n main::update(./verify.pl:88): open($fh, "-|", "bzcat", "$fullfile.xml.bz2") main::update(./verify.pl:89): or die "Can't fork bzcat: $!\n"; DB<2> n main::update(./verify.pl:90): my $data = {}; main::update(./verify.pl:91): $parser = new XML::Twig main::update(./verify.pl:92): ( twig_roots => { DB<2> n main::update(./verify.pl:108): }); DB<2> n main::update(./verify.pl:109): $parser->parse($fh); DB<2> n *** glibc detected *** double free or corruption (!prev): 0x08d2b4d0 ***
Subject: ct-usb-audio-test.xml.bz2
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----------=_1139209590-24388-1"
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Length: 0
Content-Type: text/plain; charset="utf8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 0
Content-Type: application/x-bzip; name="ct-usb-audio-test.xml.bz2"
Content-Disposition: inline; filename="ct-usb-audio-test.xml.bz2"
Content-Transfer-Encoding: base64
Content-Length: 11346
Download ct-usb-audio-test.xml.bz2
application/x-bzip 11k

Message body not shown because it is not plain text.

MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Message-Id: <rt-3.5.HEAD-24371-1139209716-1631.17500-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 1381
Download (untitled) / with headers
text/plain 1.3k
Here's the full invocation code: $parser = new XML::Twig ( twig_roots => { "title" => sub { $oldval->{title} = $_[1]->text(); shift()->purge(); }, "expires" => sub { $oldval->{expiry} = $_[1]->text(); shift()->purge(); }, "timestamp" => sub { $oldval->{timestamp} = $_[1]->text(); shift()->purge(); }, "keywords" => sub { $oldval->{keywords} = $_[1]->text(); shift()->purge(); }, "hardcopy" => sub { $oldval->{hardcopy} = $_[1]->text(); shift()->purge(); }, "tag" => sub { push @{$oldval->{tags}}, $_[1]->text(); shift()->purge(); }, "file" => sub { $oldval->{indexfile}->{$_[1]->att("name")} = $_[1]->att("index") ? 'y' : 'n'; shift()->purge(); }, }); After the "***glib ..." message, the complete perl process (including the debugger) is aborted.
X-Scanned-BY: AMaViS-ng at bestpractical
MIME-Version: 1.0
X-Spam-Status: No, hits=-2.6 required=8.0 tests=BAYES_00,SPF_HELO_PASS
In-Reply-To: <rt-3.5.HEAD-24388-1139209591-319.17500-4-0 [...] rt.cpan.org>
X-Accept-Language: en-us, en
Received-SPF: neutral (x1.develooper.com: local policy)
References: <RT-Ticket-17500 [...] rt.cpan.org> <rt-3.5.HEAD-24388-1139209591-319.17500-4-0 [...] rt.cpan.org>
Content-Type: multipart/mixed; boundary="------------020607080803080602010603"
Received: from localhost (localhost.localdomain [127.0.0.1]) by diesel.bestpractical.com (Postfix) with ESMTP id 47DF84D819D for <cpan-bug+xml-twig [...] diesel.bestpractical.com>; Mon, 6 Feb 2006 06:12:15 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id DFB4F4D8199 for <bug-XML-Twig [...] rt.cpan.org>; Mon, 6 Feb 2006 06:12:14 -0500 (EST)
Received: (qmail 8101 invoked by alias); 6 Feb 2006 11:11:40 -0000
Received: from mail-relay-2.tiscali.it (HELO mail-relay-2.tiscali.it) (213.205.33.42) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Mon, 06 Feb 2006 03:11:11 -0800
Received: from [192.168.2.200] (217.133.3.216) by mail-relay-2.tiscali.it (7.2.069.1) id 4382FB7B0095CE8B for bug-XML-Twig [...] rt.cpan.org; Mon, 6 Feb 2006 12:10:46 +0100
Delivered-To: cpan-bug+xml-twig [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #17500] *** glibc detected *** double free or corruption (!prev): 0x08d2b4d0 ***
User-Agent: Mozilla Thunderbird 1.0.7-4mdk (X11/20051221)
Return-Path: <mirod [...] xmltwig.com>
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: cpan-bug+xml-twig [...] diesel.bestpractical.com
Date: Mon, 06 Feb 2006 12:10:45 +0100
Message-Id: <43E72EB5.3040405 [...] xmltwig.com>
To: bug-XML-Twig [...] rt.cpan.org
From: Michel Rodriguez <mirod [...] xmltwig.com>
RT-Message-ID: <rt-3.5.HEAD-24384-1139224340-413.17500-0-0 [...] rt.cpan.org>
Content-Length: 0
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Transfer-Encoding: 7bit
X-RT-Original-Encoding: ISO-8859-1
X-RT-Original-Encoding: utf-8
Content-Length: 377
Download (untitled) / with headers
text/plain 377b
You are not giving me enough information here. The XML you are working with is missing. Could you send me a complete test case that includes sample data? Something along the lines of the attached file, that reproduces the bug would be fine. The output of perl -v and of the t/zz_config.t file would also be useful. Thanks -- Michel Rodriguez Perl &amp; XML xmltwig.com
content-type: text/plain; charset="utf-8"; name="rt_17500"
content-disposition: inline; filename="rt_17500"
Content-Transfer-Encoding: 7bit
X-RT-Original-Encoding: ascii
X-RT-Original-Encoding: utf-8
Content-Length: 2018
Download rt_17500
text/plain 1.9k
#!/usr/bin/perl use strict; use warnings; use XML::Twig; use YAML; my $xml="rt_17500.xml"; open( my $xml_fh, '>', $xml) or die "can't create $xml: $!"; while(<DATA>) { print {$xml_fh} $_; } close $xml_fh; system "/usr/bin/bzip2 -f $xml"; my $oldval; eval { my($fh,$parser); open($fh, "-|", "bzcat", "$xml.bz2"), or die "Can't fork bzcat: $!\n"; $oldval = {}; $parser = new XML::Twig ( twig_roots => { "title" => sub { $oldval->{title} = $_[1]->text(); shift()->purge(); }, "expires" => sub { $oldval->{expiry} = $_[1]->text(); shift()->purge(); }, "timestamp" => sub { $oldval->{timestamp} = $_[1]->text(); shift()->purge(); }, "keywords" => sub { $oldval->{keywords} = $_[1]->text(); shift()->purge(); }, "hardcopy" => sub { $oldval->{hardcopy} = $_[1]->text(); shift()->purge(); }, "tag" => sub { push @{$oldval->{tags}}, $_[1]->text(); shift()->purge(); }, "file" => sub { $oldval->{indexfile}->{$_[1]->att("name")} = $_[1]->att("index") ? 'y' : 'n'; shift()->purge(); }, } ); $parser->parse($fh); }; if( $@) { die "error parsing: $@"; } print Dump $oldval; __DATA__ <doc> <item> <title>title</title> <expires>2006-12-31</expires> <timestamp>2005-04-01</timestamp> <hardcopy>yes</hardcopy> <tag>big</tag> <tag>bigger</tag> <file name="file1" index="1"/> <keywords>k1 k2</keywords> </item> <item> <title>title 2</title> <expires>2007-12-31</expires> <timestamp>2004-04-01</timestamp> <hardcopy>no</hardcopy> <tag>small</tag> <tag>smaller</tag> <file name="file2" index="0"/> <keywords>k1 k2</keywords> </item> </doc>
X-Scanned-BY: AMaViS-ng at bestpractical
X-Habeas-SWE-5: Sender Warranted Email (SWE) (tm). The sender of this
MIME-Version: 1.0
X-Spam-Status: No, hits=-2.2 required=8.0 tests=BAYES_00,FORGED_RCVD_HELO,MIME_BASE64_NO_NAME,SPF_HELO_PASS,SPF_PASS
In-Reply-To: <rt-3.5.HEAD-24384-1139224340-413.17500-6-0 [...] rt.cpan.org> (bug-XML-Twig [...] rt.cpan.org's message of "Mon, 6 Feb 2006 06:12:22 -0500 (EST)")
Received-SPF: pass (x1.develooper.com: domain of Nikolaus [...] bounce.rath.org designates 213.73.82.69 as permitted sender)
References: <RT-Ticket-17500 [...] rt.cpan.org> <rt-3.5.HEAD-24388-1139209591-319.17500-4-0 [...] rt.cpan.org> <43E72EB5.3040405 [...] xmltwig.com> <rt-3.5.HEAD-24384-1139224340-413.17500-6-0 [...] rt.cpan.org>
X-Habeas-SWE-4: Copyright 2002 Habeas (tm)
X-Virus-Checked: Checked
X-Habeas-SWE-9: mark in spam to <http://www.habeas.com/report/>.
X-Habeas-SWE-1: winter into spring
Content-Type: multipart/mixed; boundary="=-=-="
X-Habeas-SWE-6: email in exchange for a license for this Habeas
Received: from localhost (localhost.localdomain [127.0.0.1]) by diesel.bestpractical.com (Postfix) with ESMTP id C76374D81A2 for <cpan-bug+xml-twig [...] diesel.bestpractical.com>; Mon, 6 Feb 2006 10:58:29 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id E8B1F4D81A1 for <bug-XML-Twig [...] rt.cpan.org>; Mon, 6 Feb 2006 10:58:28 -0500 (EST)
Received: (qmail 13240 invoked by alias); 6 Feb 2006 15:57:54 -0000
Received: from ebox.rath.org (HELO rath.org) (213.73.82.69) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Mon, 06 Feb 2006 07:57:21 -0800
Received: from deimos.iu-bremen.de ([212.201.44.249] helo=nokile.rath.org) by rath.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.50) id 1F68jp-00063p-KS for bug-XML-Twig [...] rt.cpan.org; Mon, 06 Feb 2006 15:57:13 +0000
Received: by nokile.rath.org (Postfix, from userid 1000) id CABD5153C10A; Mon, 6 Feb 2006 16:57:12 +0100 (CET)
Delivered-To: cpan-bug+xml-twig [...] diesel.bestpractical.com
X-Habeas-SWE-2: brightly anticipated
Subject: Re: [rt.cpan.org #17500] *** glibc detected *** double free or corruption (!prev): 0x08d2b4d0 ***
User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)
Return-Path: <Nikolaus [...] bounce.rath.org>
X-Habeas-SWE-8: Message (HCM) and not spam. Please report use of this
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: cpan-bug+xml-twig [...] diesel.bestpractical.com
X-Habeas-SWE-3: like Habeas SWE (tm)
Date: Mon, 06 Feb 2006 16:57:12 +0100
X-Habeas-SWE-7: warrant mark warrants that this is a Habeas Compliant
Message-Id: <87lkwoo4yv.fsf [...] nokile.rath.org>
To: bug-XML-Twig [...] rt.cpan.org
Mail-Copies-To: never
From: Nikolaus Rath <Nikolaus [...] rath.org>
RT-Message-ID: <rt-3.5.HEAD-24401-1139241516-130.17500-0-0 [...] rt.cpan.org>
Content-Length: 0
Content-Type: text/plain; charset="utf-8"
X-RT-Original-Encoding: ascii
X-RT-Original-Encoding: utf-8
Content-Length: 405
Download (untitled) / with headers
text/plain 405b
"mirod@xmltwig.com via RT" <bug-XML-Twig@rt.cpan.org> writes: Show quoted text
> You are not giving me enough information here. The XML you are working > with is missing. > > Could you send me a complete test case that includes sample data? > Something along the lines of the attached file, that reproduces the bug > would be fine.
I thought I attached the data to the bug report... Anyway, I've attached a testcase.
Content-Type: application/octet-stream
content-disposition: attachment; filename="ct-usb-audio-test.xml.bz2"
Content-Transfer-Encoding: base64
Content-Length: 11346
Download ct-usb-audio-test.xml.bz2
application/octet-stream 11k

Message body not shown because it is not plain text.

Content-Type: text/x-perl
content-disposition: inline; filename="bug.pl"
X-RT-Original-Encoding: ascii
X-RT-Original-Encoding: ascii
Content-Length: 1277
Download bug.pl
text/x-perl 1.2k
#!/usr/bin/perl use strict; use warnings; use XML::Twig; use YAML; my $xml="ct-usb-audio-test.xml.bz2"; my $oldval; eval { my($fh,$parser); open($fh, "-|", "bzcat", "$xml"), or die "Can't fork bzcat: $!\n"; $oldval = {}; $parser = new XML::Twig ( twig_roots => { "title" => sub { $oldval->{title} = $_[1]->text(); shift()->purge(); }, "expires" => sub { $oldval->{expiry} = $_[1]->text(); shift()->purge(); }, "timestamp" => sub { $oldval->{timestamp} = $_[1]->text(); shift()->purge(); }, "keywords" => sub { $oldval->{keywords} = $_[1]->text(); shift()->purge(); }, "hardcopy" => sub { $oldval->{hardcopy} = $_[1]->text(); shift()->purge(); }, "tag" => sub { push @{$oldval->{tags}}, $_[1]->text(); shift()->purge(); }, "file" => sub { $oldval->{indexfile}->{$_[1]->att("name")} = $_[1]->att("index") ? 'y' : 'n'; shift()->purge(); }, } ); $parser->parse($fh); }; if( $@) { die "error parsing: $@"; } print Dump $oldval;
Content-Type: text/plain; charset="utf-8"
X-RT-Original-Encoding: ascii
X-RT-Original-Encoding: utf-8
Content-Length: 957
Download (untitled) / with headers
text/plain 957b
Show quoted text
> The output of perl -v and of the t/zz_config.t file would also be useful.
[134] nokile:~/Work/perlbug$ perl -v This is perl, v5.8.7 built for i486-linux-gnu-thread-multi (with 1 registered patch, see perl -V for more detail) Copyright 1987-2005, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using `man perl' or `perldoc perl'. If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page. [0] nokile:~/Work/perlbug$ locate zz_config.t [1] nokile:~/Work/perlbug$ I've got no zz_config.t. Where does it belong to? Perl or your module? I'm using Ubuntu packages. --Nikolaus -- Der Vorteil der Klugheit liegt darin, dass man sich dumm stellen kann. Das Gegenteil ist schon schwieriger. (Kurt Tucholsky)
X-Scanned-BY: AMaViS-ng at bestpractical
MIME-Version: 1.0
X-Spam-Status: No, hits=-2.6 required=8.0 tests=BAYES_00,SPF_HELO_PASS
In-Reply-To: <rt-3.5.HEAD-24401-1139241516-130.17500-5-0 [...] rt.cpan.org>
X-Accept-Language: en-us, en
Received-SPF: neutral (x1.develooper.com: local policy)
References: <RT-Ticket-17500 [...] rt.cpan.org> <rt-3.5.HEAD-24388-1139209591-319.17500-4-0 [...] rt.cpan.org> <43E72EB5.3040405 [...] xmltwig.com> <rt-3.5.HEAD-24384-1139224340-413.17500-6-0 [...] rt.cpan.org> <87lkwoo4yv.fsf [...] nokile.rath.org> <rt-3.5.HEAD-24401-1139241516-130.17500-5-0 [...] rt.cpan.org>
Content-Type: text/plain; charset=UTF-8; format=flowed
X-RT-Original-Encoding: utf-8
Received: from localhost (localhost.localdomain [127.0.0.1]) by diesel.bestpractical.com (Postfix) with ESMTP id 00B554D81A2 for <cpan-bug+xml-twig [...] diesel.bestpractical.com>; Mon, 6 Feb 2006 11:22:58 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id 90D214D819F for <bug-XML-Twig [...] rt.cpan.org>; Mon, 6 Feb 2006 11:22:57 -0500 (EST)
Received: (qmail 23782 invoked by alias); 6 Feb 2006 16:22:21 -0000
Received: from mail-relay-2.tiscali.it (HELO mail-relay-2.tiscali.it) (213.205.33.42) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Mon, 06 Feb 2006 08:21:51 -0800
Received: from [192.168.2.200] (217.133.3.216) by mail-relay-2.tiscali.it (7.2.069.1) id 4382FB7B0096BE96 for bug-XML-Twig [...] rt.cpan.org; Mon, 6 Feb 2006 17:21:44 +0100
Delivered-To: cpan-bug+xml-twig [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #17500] *** glibc detected *** double free or corruption (!prev): 0x08d2b4d0 ***
User-Agent: Mozilla Thunderbird 1.0.7-4mdk (X11/20051221)
Return-Path: <mirod [...] xmltwig.com>
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: cpan-bug+xml-twig [...] diesel.bestpractical.com
Date: Mon, 06 Feb 2006 17:21:43 +0100
Message-Id: <43E77797.7080403 [...] xmltwig.com>
To: bug-XML-Twig [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: Michel Rodriguez <mirod [...] xmltwig.com>
X-RT-Original-Encoding: utf-8
RT-Message-ID: <rt-3.5.HEAD-24393-1139242983-108.17500-0-0 [...] rt.cpan.org>
Content-Length: 807
Download (untitled) / with headers
text/plain 807b
Nikolaus Rath via RT wrote: Show quoted text
> [134] nokile:~/Work/perlbug$ perl -v > > This is perl, v5.8.7 built for i486-linux-gnu-thread-multi > (with 1 registered patch, see perl -V for more detail) > [...] > I've got no zz_config.t. Where does it belong to? Perl or your module? > I'm using Ubuntu packages.
zz_config.t is in the t directory for the module. I ran your test here and did not get an arror (perl 5.8.7 on linux too, unthreaded though). Could you: - try with the latest version of XML::Twig, which can be found at http://xmltwig.com/xmltwig/ ('make test' should give you configuration information) - try without the fork to bzcat Thanks In the meantime I'll compile a threaded version of Perl and see if I can reproduce the problem. -- Michel Rodriguez Perl &amp; XML xmltwig.com
X-Scanned-BY: AMaViS-ng at bestpractical
MIME-Version: 1.0
X-Spam-Status: No, hits=-2.6 required=8.0 tests=BAYES_00,SPF_HELO_PASS
In-Reply-To: <rt-3.5.HEAD-24393-1139242983-108.17500-5-0 [...] rt.cpan.org>
X-Accept-Language: en-us, en
Received-SPF: neutral (x1.develooper.com: local policy)
References: <RT-Ticket-17500 [...] rt.cpan.org> <rt-3.5.HEAD-24388-1139209591-319.17500-4-0 [...] rt.cpan.org> <43E72EB5.3040405 [...] xmltwig.com> <rt-3.5.HEAD-24384-1139224340-413.17500-6-0 [...] rt.cpan.org> <87lkwoo4yv.fsf [...] nokile.rath.org> <rt-3.5.HEAD-24401-1139241516-130.17500-5-0 [...] rt.cpan.org> <43E77797.7080403 [...] xmltwig.com> <rt-3.5.HEAD-24393-1139242983-108.17500-5-0 [...] rt.cpan.org>
Content-Type: text/plain; charset=UTF-8; format=flowed
X-RT-Original-Encoding: utf-8
Received: from localhost (localhost.localdomain [127.0.0.1]) by diesel.bestpractical.com (Postfix) with ESMTP id 7EB184D81BD for <cpan-bug+xml-twig [...] diesel.bestpractical.com>; Mon, 6 Feb 2006 13:07:48 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id 0513C4D81BC for <bug-XML-Twig [...] rt.cpan.org>; Mon, 6 Feb 2006 13:07:47 -0500 (EST)
Received: (qmail 4691 invoked by alias); 6 Feb 2006 18:07:13 -0000
Received: from mail-relay-1.tiscali.it (HELO mail-relay-1.tiscali.it) (213.205.33.41) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Mon, 06 Feb 2006 10:07:11 -0800
Received: from [192.168.2.200] (217.133.3.216) by mail-relay-1.tiscali.it (7.2.069.1) id 43E78ED300000606 for bug-XML-Twig [...] rt.cpan.org; Mon, 6 Feb 2006 19:07:04 +0100
Delivered-To: cpan-bug+xml-twig [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #17500] *** glibc detected *** double free or corruption (!prev): 0x08d2b4d0 ***
User-Agent: Mozilla Thunderbird 1.0.7-4mdk (X11/20051221)
Return-Path: <mirod [...] xmltwig.com>
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: cpan-bug+xml-twig [...] diesel.bestpractical.com
Date: Mon, 06 Feb 2006 19:07:03 +0100
Message-Id: <43E79047.4010508 [...] xmltwig.com>
To: bug-XML-Twig [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: Michel Rodriguez <mirod [...] xmltwig.com>
X-RT-Original-Encoding: utf-8
RT-Message-ID: <rt-3.5.HEAD-24388-1139249272-1005.17500-0-0 [...] rt.cpan.org>
Content-Length: 479
Download (untitled) / with headers
text/plain 479b
mirod@xmltwig.com via RT wrote: Show quoted text
> In the meantime I'll compile a threaded version of Perl and see if I can > reproduce the problem.
The threaded version (v5.8.7 built for i686-linux-thread-multi) still doesn't show the problem. At this point, if the latest version does not solve your problem, I would try to rewrite the code by having the twig_roots on a single, englobing, element, and avoiding the many calls to purge. -- Michel Rodriguez Perl &amp; XML xmltwig.com
X-Scanned-BY: AMaViS-ng at bestpractical
X-Habeas-SWE-5: Sender Warranted Email (SWE) (tm). The sender of this
MIME-Version: 1.0
X-Spam-Status: No, hits=-2.5 required=8.0 tests=BAYES_00,FORGED_RCVD_HELO,SPF_HELO_PASS,SPF_PASS
In-Reply-To: <rt-3.5.HEAD-24393-1139242983-108.17500-6-0 [...] rt.cpan.org> (bug-XML-Twig [...] rt.cpan.org's message of "Mon, 6 Feb 2006 11:23:04 -0500 (EST)")
Received-SPF: pass (x1.develooper.com: domain of Nikolaus [...] bounce.rath.org designates 213.73.82.69 as permitted sender)
References: <RT-Ticket-17500 [...] rt.cpan.org> <rt-3.5.HEAD-24388-1139209591-319.17500-4-0 [...] rt.cpan.org> <43E72EB5.3040405 [...] xmltwig.com> <rt-3.5.HEAD-24384-1139224340-413.17500-6-0 [...] rt.cpan.org> <87lkwoo4yv.fsf [...] nokile.rath.org> <rt-3.5.HEAD-24401-1139241516-130.17500-5-0 [...] rt.cpan.org> <43E77797.7080403 [...] xmltwig.com> <rt-3.5.HEAD-24393-1139242983-108.17500-6-0 [...] rt.cpan.org>
X-Habeas-SWE-4: Copyright 2002 Habeas (tm)
X-Habeas-SWE-9: mark in spam to <http://www.habeas.com/report/>.
X-Habeas-SWE-1: winter into spring
Content-Type: text/plain; charset=utf-8
X-Habeas-SWE-6: email in exchange for a license for this Habeas
X-RT-Original-Encoding: utf-8
Received: from localhost (localhost.localdomain [127.0.0.1]) by diesel.bestpractical.com (Postfix) with ESMTP id 75C6D4D81E2 for <cpan-bug+xml-twig [...] diesel.bestpractical.com>; Mon, 6 Feb 2006 14:58:48 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id 03C784D81E1 for <bug-XML-Twig [...] rt.cpan.org>; Mon, 6 Feb 2006 14:58:47 -0500 (EST)
Received: (qmail 21403 invoked by alias); 6 Feb 2006 19:58:13 -0000
Received: from ebox.rath.org (HELO rath.org) (213.73.82.69) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Mon, 06 Feb 2006 11:58:03 -0800
Received: from deimos.iu-bremen.de ([212.201.44.249] helo=nokile.rath.org) by rath.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.50) id 1F6CUi-000D0W-B8 for bug-XML-Twig [...] rt.cpan.org; Mon, 06 Feb 2006 19:57:52 +0000
Received: by nokile.rath.org (Postfix, from userid 1000) id 1E5CE153C10A; Mon, 6 Feb 2006 20:57:50 +0100 (CET)
Delivered-To: cpan-bug+xml-twig [...] diesel.bestpractical.com
X-Habeas-SWE-2: brightly anticipated
Subject: Re: [rt.cpan.org #17500] *** glibc detected *** double free or corruption (!prev): 0x08d2b4d0 ***
User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)
Return-Path: <Nikolaus [...] bounce.rath.org>
X-Habeas-SWE-8: Message (HCM) and not spam. Please report use of this
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: cpan-bug+xml-twig [...] diesel.bestpractical.com
X-Habeas-SWE-3: like Habeas SWE (tm)
Date: Mon, 06 Feb 2006 20:57:50 +0100
X-Habeas-SWE-7: warrant mark warrants that this is a Habeas Compliant
Message-Id: <87u0bcqmyp.fsf [...] nokile.rath.org>
To: bug-XML-Twig [...] rt.cpan.org
Content-Transfer-Encoding: quoted-printable
Mail-Copies-To: never
From: Nikolaus Rath <Nikolaus [...] rath.org>
X-RT-Original-Encoding: utf-8
RT-Message-ID: <rt-3.5.HEAD-24384-1139255937-289.17500-0-0 [...] rt.cpan.org>
Content-Length: 1514
Download (untitled) / with headers
text/plain 1.4k
"mirod@xmltwig.com via RT" <bug-XML-Twig@rt.cpan.org> writes: Show quoted text
>> [134] nokile:~/Work/perlbug$ perl -v >> >> This is perl, v5.8.7 built for i486-linux-gnu-thread-multi >> (with 1 registered patch, see perl -V for more detail) >> [...] >> I've got no zz_config.t. Where does it belong to? Perl or your module? >> I'm using Ubuntu packages.
> > zz_config.t is in the t directory for the module. > > I ran your test here and did not get an arror (perl 5.8.7 on linux too, > unthreaded though). > > Could you: > > - try with the latest version of XML::Twig, which can be found at > http://xmltwig.com/xmltwig/ ('make test' should give you > configuration information)
I tried to reinstall, but: Failed Test Stat Wstat Total Fail Failed List of Failed -------------------------------------------------------------------------------------------------------- t/test_additional.t 647 2 0.31% 346 348 t/test_bugs_3.18.t 157 13 8.28% 11-23 t/test_bugs_3.19.t 26 6 23.08% 5-6 20-23 Failed 3/82 test scripts, 96.34% okay. 21/3795 subtests failed, 99.45% okay. make: *** [test_dynamic] Error 255 Before that, I got a lot of UTF-8 encoding warnings, which allowed me to narrow the problem: Both 'make test' and my testcase work if I unset PERL_UNICODE (which is set to SDAL here, because it's a pure UTF-8 system). I hope this helps to pin down the problem. Regards, --Nikolaus -- Übermorgen bekommen sie mein endgültiges Vielleicht!
X-Scanned-BY: AMaViS-ng at bestpractical
MIME-Version: 1.0
X-Spam-Status: No, hits=-2.6 required=8.0 tests=BAYES_00,SPF_HELO_PASS
In-Reply-To: <rt-3.5.HEAD-24384-1139255937-289.17500-5-0 [...] rt.cpan.org>
X-Accept-Language: en-us, en
Received-SPF: neutral (x1.develooper.com: local policy)
References: <RT-Ticket-17500 [...] rt.cpan.org> <rt-3.5.HEAD-24388-1139209591-319.17500-4-0 [...] rt.cpan.org> <43E72EB5.3040405 [...] xmltwig.com> <rt-3.5.HEAD-24384-1139224340-413.17500-6-0 [...] rt.cpan.org> <87lkwoo4yv.fsf [...] nokile.rath.org> <rt-3.5.HEAD-24401-1139241516-130.17500-5-0 [...] rt.cpan.org> <43E77797.7080403 [...] xmltwig.com> <rt-3.5.HEAD-24393-1139242983-108.17500-6-0 [...] rt.cpan.org> <87u0bcqmyp.fsf [...] nokile.rath.org> <rt-3.5.HEAD-24384-1139255937-289.17500-5-0 [...] rt.cpan.org>
Content-Type: text/plain; charset=UTF-8; format=flowed
X-RT-Original-Encoding: utf-8
Received: from localhost (localhost.localdomain [127.0.0.1]) by diesel.bestpractical.com (Postfix) with ESMTP id A192D4D80B5 for <cpan-bug+xml-twig [...] diesel.bestpractical.com>; Tue, 7 Feb 2006 02:04:42 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id 4DC924D8071 for <bug-XML-Twig [...] rt.cpan.org>; Tue, 7 Feb 2006 02:04:42 -0500 (EST)
Received: (qmail 24414 invoked by alias); 7 Feb 2006 07:04:07 -0000
Received: from mail-relay-3.tiscali.it (HELO mail-relay-3.tiscali.it) (213.205.33.43) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Mon, 06 Feb 2006 23:04:03 -0800
Received: from [192.168.2.200] (217.133.3.216) by mail-relay-3.tiscali.it (7.2.069.1) id 438439FE00949F86 for bug-XML-Twig [...] rt.cpan.org; Tue, 7 Feb 2006 08:03:54 +0100
Delivered-To: cpan-bug+xml-twig [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #17500] *** glibc detected *** double free or corruption (!prev): 0x08d2b4d0 ***
User-Agent: Mozilla Thunderbird 1.0.7-4mdk (X11/20051221)
Return-Path: <mirod [...] xmltwig.com>
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: cpan-bug+xml-twig [...] diesel.bestpractical.com
Date: Tue, 07 Feb 2006 08:03:38 +0100
Message-Id: <43E8464A.1060205 [...] xmltwig.com>
To: bug-XML-Twig [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: Michel Rodriguez <mirod [...] xmltwig.com>
X-RT-Original-Encoding: utf-8
RT-Message-ID: <rt-3.5.HEAD-24388-1139295888-1228.17500-0-0 [...] rt.cpan.org>
Content-Length: 2180
Download (untitled) / with headers
text/plain 2.1k
Nikolaus Rath via RT wrote: Show quoted text
> I tried to reinstall, but: > > Failed Test Stat Wstat Total Fail Failed List of Failed > -------------------------------------------------------------------------------------------------------- > t/test_additional.t 647 2 0.31% 346 348 > t/test_bugs_3.18.t 157 13 8.28% 11-23 > t/test_bugs_3.19.t 26 6 23.08% 5-6 20-23 > Failed 3/82 test scripts, 96.34% okay. 21/3795 subtests failed, 99.45% okay. > make: *** [test_dynamic] Error 255 > > > Before that, I got a lot of UTF-8 encoding warnings, which allowed me > to narrow the problem: Both 'make test' and my testcase work if I > unset PERL_UNICODE (which is set to SDAL here, because it's a pure > UTF-8 system). > > I hope this helps to pin down the problem.
It does, nice job, With PERL_UNICODE set to SDAL, I was able to reproduce the bug, and indeed to get the same error message you got. It goes away if, instead of parsing a pipe from bzcat, I parse a regular XML file. It also works fine if you do the bzcat and pipe it to the code: PERL_UNICODE=SDAL bzcat -c rt_17500.xml.bz2 | perl bug.pl and parse \*STDIN in the code. Stepping through the code with debugger it looks like actually the problem occurs before even reaching any XML::Twig specific code. It looks like it's a problem with IO::File ignoring PERL_UNICODE (or -C). XML::Parser, on which XML::Twig is based, uses IO::File. This is confirmed by this thread: http://www.mhonarc.org/archive/html/perl-unicode/2004-04/msg00004.html As the problem is due to the 'D' option, telling perl to use the perlIO layer, the easiest workaround is to use the -CSAL option on the shebang line (or on the command line). As for the test failures: you end telling the system to read as unicode, files that are in iso-8859-1. I will have to take this case into account in the test (baring in mind that XML::Twig should still work with very old versions of perl!). So I will fix the tests and add a note about the PERL_UNICODE/-CD option in the docs (and in the FAQ). Does this solve the problem? Thanks -- Michel Rodriguez Perl &amp; XML xmltwig.com
X-Scanned-BY: AMaViS-ng at bestpractical
X-Habeas-SWE-5: Sender Warranted Email (SWE) (tm). The sender of this
MIME-Version: 1.0
X-Spam-Status: No, hits=-2.5 required=8.0 tests=BAYES_00,FORGED_RCVD_HELO,SPF_HELO_PASS,SPF_PASS
In-Reply-To: <rt-3.5.HEAD-24388-1139295888-1228.17500-6-0 [...] rt.cpan.org> (bug-XML-Twig [...] rt.cpan.org's message of "Tue, 7 Feb 2006 02:04:49 -0500 (EST)")
Received-SPF: pass (x1.develooper.com: domain of Nikolaus [...] bounce.rath.org designates 213.73.82.69 as permitted sender)
References: <RT-Ticket-17500 [...] rt.cpan.org> <rt-3.5.HEAD-24388-1139209591-319.17500-4-0 [...] rt.cpan.org> <43E72EB5.3040405 [...] xmltwig.com> <rt-3.5.HEAD-24384-1139224340-413.17500-6-0 [...] rt.cpan.org> <rt-3.5.HEAD-24401-1139241516-130.17500-5-0 [...] rt.cpan.org> <43E77797.7080403 [...] xmltwig.com> <rt-3.5.HEAD-24393-1139242983-108.17500-6-0 [...] rt.cpan.org> <87u0bcqmyp.fsf [...] nokile.rath.org> <rt-3.5.HEAD-24384-1139255937-289.17500-5-0 [...] rt.cpan.org> <43E8464A.1060205 [...] xmltwig.com> <rt-3.5.HEAD-24388-1139295888-1228.17500-6-0 [...] rt.cpan.org>
X-Habeas-SWE-4: Copyright 2002 Habeas (tm)
X-Habeas-SWE-9: mark in spam to <http://www.habeas.com/report/>.
X-Habeas-SWE-1: winter into spring
Content-Type: text/plain; charset="utf-8"
X-Habeas-SWE-6: email in exchange for a license for this Habeas
X-RT-Original-Encoding: us-ascii
Received: from localhost (localhost.localdomain [127.0.0.1]) by diesel.bestpractical.com (Postfix) with ESMTP id 74E534D80F0 for <cpan-bug+xml-twig [...] diesel.bestpractical.com>; Tue, 7 Feb 2006 04:07:41 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id 5ADF14D8071 for <bug-XML-Twig [...] rt.cpan.org>; Tue, 7 Feb 2006 04:07:08 -0500 (EST)
Received: (qmail 12537 invoked by alias); 7 Feb 2006 09:06:34 -0000
Received: from ebox.rath.org (HELO rath.org) (213.73.82.69) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Tue, 07 Feb 2006 01:01:16 -0800
Received: from deimos.iu-bremen.de ([212.201.44.249] helo=nokile.rath.org) by rath.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.50) id 1F6Oif-0009dt-1y for bug-XML-Twig [...] rt.cpan.org; Tue, 07 Feb 2006 09:01:05 +0000
Received: by nokile.rath.org (Postfix, from userid 1000) id 0CF28153C10A; Tue, 7 Feb 2006 10:01:04 +0100 (CET)
Delivered-To: cpan-bug+xml-twig [...] diesel.bestpractical.com
X-Habeas-SWE-2: brightly anticipated
Subject: Re: [rt.cpan.org #17500] *** glibc detected *** double free or corruption (!prev): 0x08d2b4d0 ***
User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)
Return-Path: <Nikolaus [...] bounce.rath.org>
X-Habeas-SWE-8: Message (HCM) and not spam. Please report use of this
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: cpan-bug+xml-twig [...] diesel.bestpractical.com
X-Habeas-SWE-3: like Habeas SWE (tm)
Date: Tue, 07 Feb 2006 10:01:04 +0100
X-Habeas-SWE-7: warrant mark warrants that this is a Habeas Compliant
Message-Id: <8764nrbl0v.fsf [...] nokile.rath.org>
To: bug-XML-Twig [...] rt.cpan.org
Mail-Copies-To: never
From: Nikolaus Rath <Nikolaus [...] rath.org>
X-RT-Original-Encoding: utf-8
RT-Message-ID: <rt-3.5.HEAD-24371-1139303401-1961.17500-0-0 [...] rt.cpan.org>
Content-Length: 983
Download (untitled) / with headers
text/plain 983b
"mirod@xmltwig.com via RT" <bug-XML-Twig@rt.cpan.org> writes: Show quoted text
> Stepping through the code with debugger it looks like actually the > problem occurs before even reaching any XML::Twig specific code. It > looks like it's a problem with IO::File ignoring PERL_UNICODE (or -C). > XML::Parser, on which XML::Twig is based, uses IO::File. > > This is confirmed by this thread: > http://www.mhonarc.org/archive/html/perl-unicode/2004-04/msg00004.html
You're absolutely right. Actually, I already stumbled over this bug some time ago: http://rt.perl.org/rt3/Ticket/Display.html?id=38181 But in this case I somehow missed to see the connection. Thanks for your help. Regards, --Nikolaus -- *Catholism*: If shit happend I deserve it. *Voodoo*: Shit will hapen to you. *Ateism*: Shit happens, but I don't care anyway. *Judaism*: Why does shit always happen to us? *Mormonism*: If shit happens we still got enough women to clean it up. *Moslemism*: If shit happens take a hostage.
X-Scanned-BY: AMaViS-ng at bestpractical
MIME-Version: 1.0
X-Spam-Status: No, hits=-2.6 required=8.0 tests=BAYES_00,SPF_HELO_PASS
In-Reply-To: <rt-3.5.HEAD-24371-1139303401-1961.17500-5-0 [...] rt.cpan.org>
X-Accept-Language: en-us, en
Received-SPF: neutral (x1.develooper.com: local policy)
References: <RT-Ticket-17500 [...] rt.cpan.org> <rt-3.5.HEAD-24388-1139209591-319.17500-4-0 [...] rt.cpan.org> <43E72EB5.3040405 [...] xmltwig.com> <rt-3.5.HEAD-24384-1139224340-413.17500-6-0 [...] rt.cpan.org> <rt-3.5.HEAD-24393-1139242983-108.17500-6-0 [...] rt.cpan.org> <87u0bcqmyp.fsf [...] nokile.rath.org> <rt-3.5.HEAD-24384-1139255937-289.17500-5-0 [...] rt.cpan.org> <43E8464A.1060205 [...] xmltwig.com> <rt-3.5.HEAD-24388-1139295888-1228.17500-6-0 [...] rt.cpan.org> <8764nrbl0v.fsf [...] nokile.rath.org> <rt-3.5.HEAD-24371-1139303401-1961.17500-5-0 [...] rt.cpan.org>
Content-Type: text/plain; charset=UTF-8; format=flowed
X-RT-Original-Encoding: utf-8
Received: from localhost (localhost.localdomain [127.0.0.1]) by diesel.bestpractical.com (Postfix) with ESMTP id 748684D80F1 for <cpan-bug+xml-twig [...] diesel.bestpractical.com>; Tue, 7 Feb 2006 05:25:09 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id E64B64D8071 for <bug-XML-Twig [...] rt.cpan.org>; Tue, 7 Feb 2006 05:25:08 -0500 (EST)
Received: (qmail 13749 invoked by alias); 7 Feb 2006 10:24:32 -0000
Received: from mail-relay-2.tiscali.it (HELO mail-relay-2.tiscali.it) (213.205.33.42) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Tue, 07 Feb 2006 02:24:17 -0800
Received: from [192.168.2.200] (217.133.3.216) by mail-relay-2.tiscali.it (7.2.069.1) id 4382FB7B00987F7B for bug-XML-Twig [...] rt.cpan.org; Tue, 7 Feb 2006 11:24:09 +0100
Delivered-To: cpan-bug+xml-twig [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #17500] *** glibc detected *** double free or corruption (!prev): 0x08d2b4d0 ***
User-Agent: Mozilla Thunderbird 1.0.7-4mdk (X11/20051221)
Return-Path: <mirod [...] xmltwig.com>
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: cpan-bug+xml-twig [...] diesel.bestpractical.com
Date: Tue, 07 Feb 2006 11:24:08 +0100
Message-Id: <43E87548.8060209 [...] xmltwig.com>
To: bug-XML-Twig [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: Michel Rodriguez <mirod [...] xmltwig.com>
X-RT-Original-Encoding: utf-8
RT-Message-ID: <rt-3.5.HEAD-24371-1139307914-1568.17500-0-0 [...] rt.cpan.org>
Content-Length: 1324
Download (untitled) / with headers
text/plain 1.2k
Nikolaus Rath via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=17500 > > > "mirod@xmltwig.com via RT" <bug-XML-Twig@rt.cpan.org> writes: >
>>Stepping through the code with debugger it looks like actually the >>problem occurs before even reaching any XML::Twig specific code. It >>looks like it's a problem with IO::File ignoring PERL_UNICODE (or -C). >>XML::Parser, on which XML::Twig is based, uses IO::File. >> >>This is confirmed by this thread: >>http://www.mhonarc.org/archive/html/perl-unicode/2004-04/msg00004.html
> > > You're absolutely right. Actually, I already stumbled over this bug > some time ago: > > http://rt.perl.org/rt3/Ticket/Display.html?id=38181 > > But in this case I somehow missed to see the connection. Thanks for > your help.
I have a version of XML::Twig that traps this error and issues a nicer error message. Now the problem remains that tests fail. More important, whether tests pass or fail, PERL_UNICODE and -C are user-level options, and once set, there doesn't seem to be anything I can do at XML::Twig level to reset the unicode flags to a value that would work. At runtime, I think all I can do is raise an error if {^UNICODE} tells me that the UTF8 perIO layer is used and the XML encoding is not utf8. -- Michel Rodriguez Perl &amp; XML xmltwig.com
X-Scanned-BY: AMaViS-ng at bestpractical
MIME-Version: 1.0
X-Spam-Status: No, hits=-2.6 required=8.0 tests=BAYES_00,SPF_HELO_PASS
In-Reply-To: <rt-3.5.HEAD-24371-1139307914-1568.17500-5-0 [...] rt.cpan.org>
X-Accept-Language: en-us, en
Received-SPF: neutral (x1.develooper.com: local policy)
References: <RT-Ticket-17500 [...] rt.cpan.org> <rt-3.5.HEAD-24388-1139209591-319.17500-4-0 [...] rt.cpan.org> <43E72EB5.3040405 [...] xmltwig.com> <rt-3.5.HEAD-24384-1139224340-413.17500-6-0 [...] rt.cpan.org> <rt-3.5.HEAD-24384-1139255937-289.17500-5-0 [...] rt.cpan.org> <43E8464A.1060205 [...] xmltwig.com> <rt-3.5.HEAD-24388-1139295888-1228.17500-6-0 [...] rt.cpan.org> <8764nrbl0v.fsf [...] nokile.rath.org> <rt-3.5.HEAD-24371-1139303401-1961.17500-5-0 [...] rt.cpan.org> <43E87548.8060209 [...] xmltwig.com> <rt-3.5.HEAD-24371-1139307914-1568.17500-5-0 [...] rt.cpan.org>
Content-Type: text/plain; charset=UTF-8; format=flowed
X-RT-Original-Encoding: utf-8
Received: from localhost (localhost.localdomain [127.0.0.1]) by diesel.bestpractical.com (Postfix) with ESMTP id 149284D80F1 for <cpan-bug+xml-twig [...] diesel.bestpractical.com>; Tue, 7 Feb 2006 06:28:49 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id 8F2D64D8071 for <bug-XML-Twig [...] rt.cpan.org>; Tue, 7 Feb 2006 06:28:48 -0500 (EST)
Received: (qmail 11448 invoked by alias); 7 Feb 2006 11:28:13 -0000
Received: from mail-relay-3.tiscali.it (HELO mail-relay-3.tiscali.it) (213.205.33.43) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Tue, 07 Feb 2006 03:28:00 -0800
Received: from [192.168.2.200] (217.133.3.216) by mail-relay-3.tiscali.it (7.2.069.1) id 438439FE009567E8 for bug-XML-Twig [...] rt.cpan.org; Tue, 7 Feb 2006 12:27:40 +0100
Delivered-To: cpan-bug+xml-twig [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #17500] *** glibc detected *** double free or corruption (!prev): 0x08d2b4d0 ***
User-Agent: Mozilla Thunderbird 1.0.7-4mdk (X11/20051221)
Return-Path: <mirod [...] xmltwig.com>
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: cpan-bug+xml-twig [...] diesel.bestpractical.com
Date: Tue, 07 Feb 2006 12:27:39 +0100
Message-Id: <43E8842B.40902 [...] xmltwig.com>
To: bug-XML-Twig [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: Michel Rodriguez <mirod [...] xmltwig.com>
X-RT-Original-Encoding: utf-8
RT-Message-ID: <rt-3.5.HEAD-24401-1139311734-871.17500-0-0 [...] rt.cpan.org>
Content-Length: 242
Download (untitled) / with headers
text/plain 242b
Hi, OK, the development version should now trap this error, and pass the tests with PERL_UNICODE set to SDAL (or to any other value hopefully!). Let me know if it actually does ;--) Thanks -- Michel Rodriguez Perl &amp; XML xmltwig.com
X-Scanned-BY: AMaViS-ng at bestpractical
X-Habeas-SWE-5: Sender Warranted Email (SWE) (tm). The sender of this
MIME-Version: 1.0
X-Spam-Status: No, hits=-2.5 required=8.0 tests=BAYES_00,FORGED_RCVD_HELO,SPF_HELO_PASS,SPF_PASS,UPPERCASE_25_50
In-Reply-To: <rt-3.5.HEAD-24371-1139307914-1568.17500-6-0 [...] rt.cpan.org> (bug-XML-Twig [...] rt.cpan.org's message of "Tue, 7 Feb 2006 05:25:15 -0500 (EST)")
Received-SPF: pass (x1.develooper.com: domain of Nikolaus [...] bounce.rath.org designates 213.73.82.69 as permitted sender)
References: <RT-Ticket-17500 [...] rt.cpan.org> <rt-3.5.HEAD-24388-1139209591-319.17500-4-0 [...] rt.cpan.org> <43E72EB5.3040405 [...] xmltwig.com> <rt-3.5.HEAD-24384-1139224340-413.17500-6-0 [...] rt.cpan.org> <rt-3.5.HEAD-24384-1139255937-289.17500-5-0 [...] rt.cpan.org> <43E8464A.1060205 [...] xmltwig.com> <rt-3.5.HEAD-24388-1139295888-1228.17500-6-0 [...] rt.cpan.org> <8764nrbl0v.fsf [...] nokile.rath.org> <rt-3.5.HEAD-24371-1139303401-1961.17500-5-0 [...] rt.cpan.org> <43E87548.8060209 [...] xmltwig.com> <rt-3.5.HEAD-24371-1139307914-1568.17500-6-0 [...] rt.cpan.org>
X-Habeas-SWE-4: Copyright 2002 Habeas (tm)
X-Habeas-SWE-9: mark in spam to <http://www.habeas.com/report/>.
X-Habeas-SWE-1: winter into spring
Content-Type: text/plain; charset=utf-8
X-Habeas-SWE-6: email in exchange for a license for this Habeas
X-RT-Original-Encoding: utf-8
Received: from localhost (localhost.localdomain [127.0.0.1]) by diesel.bestpractical.com (Postfix) with ESMTP id 5F9584D80F1 for <cpan-bug+xml-twig [...] diesel.bestpractical.com>; Tue, 7 Feb 2006 07:10:06 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id E50B14D8071 for <bug-XML-Twig [...] rt.cpan.org>; Tue, 7 Feb 2006 07:10:05 -0500 (EST)
Received: (qmail 31817 invoked by alias); 7 Feb 2006 12:09:31 -0000
Received: from ebox.rath.org (HELO rath.org) (213.73.82.69) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Tue, 07 Feb 2006 04:09:19 -0800
Received: from deimos.iu-bremen.de ([212.201.44.249] helo=nokile.rath.org) by rath.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.50) id 1F6Rei-000FHL-Fy for bug-XML-Twig [...] rt.cpan.org; Tue, 07 Feb 2006 12:09:12 +0000
Received: by nokile.rath.org (Postfix, from userid 1000) id 6D7EB153C10A; Tue, 7 Feb 2006 13:09:11 +0100 (CET)
Delivered-To: cpan-bug+xml-twig [...] diesel.bestpractical.com
X-Habeas-SWE-2: brightly anticipated
Subject: Re: [rt.cpan.org #17500] *** glibc detected *** double free or corruption (!prev): 0x08d2b4d0 ***
User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)
Return-Path: <Nikolaus [...] bounce.rath.org>
X-Habeas-SWE-8: Message (HCM) and not spam. Please report use of this
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: cpan-bug+xml-twig [...] diesel.bestpractical.com
X-Habeas-SWE-3: like Habeas SWE (tm)
Date: Tue, 07 Feb 2006 13:09:11 +0100
X-Habeas-SWE-7: warrant mark warrants that this is a Habeas Compliant
Message-Id: <87oe1jtlp4.fsf [...] nokile.rath.org>
To: bug-XML-Twig [...] rt.cpan.org
Content-Transfer-Encoding: quoted-printable
Mail-Copies-To: never
From: Nikolaus Rath <Nikolaus [...] rath.org>
X-RT-Original-Encoding: utf-8
RT-Message-ID: <rt-3.5.HEAD-24384-1139314216-1152.17500-0-0 [...] rt.cpan.org>
Content-Length: 2518
Download (untitled) / with headers
text/plain 2.4k
"mirod@xmltwig.com via RT" <bug-XML-Twig@rt.cpan.org> writes: Show quoted text
>>>Stepping through the code with debugger it looks like actually the >>>problem occurs before even reaching any XML::Twig specific code. It >>>looks like it's a problem with IO::File ignoring PERL_UNICODE (or -C). >>>XML::Parser, on which XML::Twig is based, uses IO::File. >>> >>>This is confirmed by this thread: >>>http://www.mhonarc.org/archive/html/perl-unicode/2004-04/msg00004.html
>> >> >> You're absolutely right. Actually, I already stumbled over this bug >> some time ago: >> >> http://rt.perl.org/rt3/Ticket/Display.html?id=38181 >> >> But in this case I somehow missed to see the connection. Thanks for >> your help.
> > I have a version of XML::Twig that traps this error and issues a > nicer error message. > > At runtime, I think all I can do is raise an error if {^UNICODE} > tells me that the UTF8 perIO layer is used and the XML encoding is > not utf8.
You need some quite sophisticated tests to do that properly, because: [0] nokile:~$ locale LANG=en_US.UTF-8 LC_CTYPE=de_DE.UTF-8 LC_NUMERIC=en_US.UTF-8 LC_TIME=de_DE.UTF-8 LC_COLLATE=de_DE.UTF-8 LC_MONETARY=de_DE.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=de_DE.UTF-8 LC_NAME=de_DE.UTF-8 LC_ADDRESS=de_DE.UTF-8 LC_TELEPHONE=de_DE.UTF-8 LC_MEASUREMENT=de_DE.UTF-8 LC_IDENTIFICATION=en_US.UTF-8 LC_ALL= [0] nokile:~$ perl -e 'print "${^UNICODE}\n";' 127 and [0] nokile:~$ unset LC_NUMERIC LC_COLLATE LC_MONETARY LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION [0] nokile:~$ locale LANG= LC_CTYPE="POSIX" LC_NUMERIC="POSIX" LC_TIME="POSIX" LC_COLLATE="POSIX" LC_MONETARY="POSIX" LC_MESSAGES="POSIX" LC_PAPER="POSIX" LC_NAME="POSIX" LC_ADDRESS="POSIX" LC_TELEPHONE="POSIX" LC_MEASUREMENT="POSIX" LC_IDENTIFICATION="POSIX" LC_ALL= [0] nokile:~$ perl -e 'print "${^UNICODE}\n";' 127 so you have the check the locale yourself. Honestly, if I were you I wouldn't try to implement any workarounds for this perl bug. It's hard to do properly and the problem is already fixed in newer versions. Show quoted text
> Now the problem remains that tests fail.
IMO this isn't a problem at all. I'd just make the output nicer by checking $^UNICODE and the perl version and aborting the test with a warning if there's a problematic combination. The user will stumble over other problems sooner or later anyway, so you're doing him a favor by telling him that (and what) is wrong on his system. Regards, --Nikolaus -- Man gewöhnt sich an allem - sogar am Dativ.
X-Scanned-BY: AMaViS-ng at bestpractical
MIME-Version: 1.0
X-Spam-Status: No, hits=-2.6 required=8.0 tests=BAYES_00,SPF_HELO_PASS
In-Reply-To: <rt-3.5.HEAD-24384-1139314216-1152.17500-5-0 [...] rt.cpan.org>
X-Accept-Language: en-us, en
Received-SPF: neutral (x1.develooper.com: local policy)
References: <RT-Ticket-17500 [...] rt.cpan.org> <rt-3.5.HEAD-24388-1139209591-319.17500-4-0 [...] rt.cpan.org> <43E72EB5.3040405 [...] xmltwig.com> <rt-3.5.HEAD-24384-1139224340-413.17500-6-0 [...] rt.cpan.org> <rt-3.5.HEAD-24388-1139295888-1228.17500-6-0 [...] rt.cpan.org> <8764nrbl0v.fsf [...] nokile.rath.org> <rt-3.5.HEAD-24371-1139303401-1961.17500-5-0 [...] rt.cpan.org> <43E87548.8060209 [...] xmltwig.com> <rt-3.5.HEAD-24371-1139307914-1568.17500-6-0 [...] rt.cpan.org> <87oe1jtlp4.fsf [...] nokile.rath.org> <rt-3.5.HEAD-24384-1139314216-1152.17500-5-0 [...] rt.cpan.org>
Content-Type: text/plain; charset=UTF-8; format=flowed
X-RT-Original-Encoding: utf-8
Received: from localhost (localhost.localdomain [127.0.0.1]) by diesel.bestpractical.com (Postfix) with ESMTP id A5A9B4D80F1 for <cpan-bug+xml-twig [...] diesel.bestpractical.com>; Tue, 7 Feb 2006 07:34:03 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id 537DF4D8071 for <bug-XML-Twig [...] rt.cpan.org>; Tue, 7 Feb 2006 07:34:03 -0500 (EST)
Received: (qmail 9962 invoked by alias); 7 Feb 2006 12:33:28 -0000
Received: from mail-relay-2.tiscali.it (HELO mail-relay-2.tiscali.it) (213.205.33.42) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Tue, 07 Feb 2006 04:32:50 -0800
Received: from [192.168.2.200] (217.133.3.216) by mail-relay-2.tiscali.it (7.2.069.1) id 4382FB7B0098E3CA for bug-XML-Twig [...] rt.cpan.org; Tue, 7 Feb 2006 13:32:43 +0100
Delivered-To: cpan-bug+xml-twig [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #17500] *** glibc detected *** double free or corruption (!prev): 0x08d2b4d0 ***
User-Agent: Mozilla Thunderbird 1.0.7-4mdk (X11/20051221)
Return-Path: <mirod [...] xmltwig.com>
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: cpan-bug+xml-twig [...] diesel.bestpractical.com
Date: Tue, 07 Feb 2006 13:32:37 +0100
Message-Id: <43E89365.8090102 [...] xmltwig.com>
To: bug-XML-Twig [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: Michel Rodriguez <mirod [...] xmltwig.com>
X-RT-Original-Encoding: utf-8
RT-Message-ID: <rt-3.5.HEAD-24388-1139315651-369.17500-0-0 [...] rt.cpan.org>
Content-Length: 1058
Nikolaus Rath via RT wrote: Show quoted text
> You need some quite sophisticated tests to do that properly, because: > [...] > so you have the check the locale yourself. Honestly, if I were you I > wouldn't try to implement any workarounds for this perl bug. It's hard > to do properly and the problem is already fixed in newer versions.
Ok, it makes sense, and I don't know enough about the subject to get it right anyway. Show quoted text
>
>>Now the problem remains that tests fail.
> > IMO this isn't a problem at all. I'd just make the output nicer by > checking $^UNICODE and the perl version and aborting the test with a > warning if there's a problematic combination. The user will stumble > over other problems sooner or later anyway, so you're doing him a > favor by telling him that (and what) is wrong on his system.
That's what I did, I just skip the tests. In any case the problems are triggered by a runtime configuration for the user. Which cannot be tested at install time. I'll stop here then. Thanks for the help -- Michel Rodriguez Perl &amp; XML xmltwig.com


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.