Skip Menu |

This queue is for tickets about the Regexp-Grammars CPAN distribution.

Report information
The Basics
Id: 54819
Status: rejected
Priority: 0/
Queue: Regexp-Grammars

People
Owner: Nobody in particular
Requestors: dolmen [...] cpan.org
Cc:
AdminCc:

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



Subject: Perl memory corruption and crash on Ubuntu 9.10 amd64
The attached program (make-Changes-rss.pl) makes Perl corrupt its memory and finally crash. The fully detailed report, including coredump, is on Ubuntu LaunchPad: https://bugs.launchpad.net/ubuntu/+source/perl/+bug/524817 The R::G demo files works fine on this platform. -- Olivier Mengué - http://o.mengue.free.fr/
Subject: Changes
Download Changes
application/octet-stream 2.7k

Message body not shown because it is not plain text.

Subject: make-Changes-rss.pl
#!/usr/bin/perl use utf8; use v5.10.0; use strict; my $dist = 'POE-Component-Schedule'; my $Changes = do { open my $fd, "<:utf8", "Changes"; local $/ = undef; <$fd>; }; #print $Changes; my $parser = do { use Regexp::Grammars; qr{ \A \R* <Header> <[Release]>+ (?: # Should be at end of input... # \s* \Z #| # If not, report the fact but don't fail... <warning: Expected end-of-input> <warning: (?{ "Extra junk at index $INDEX: $CONTEXT" })> ) <token: Header> \S \V+ ( \R \V+ )* <token: Release> \R+ <debug: on> <Version> \h+ <Date> (?: <Time> <TimeZone>? )? \h+ <Author_Id> \h+ \( <Author_Name> \) \R <[Changes]>+ <debug: off> <token: Version> \d+\.\d+(_\d+)? <token: Date> \d{4}-\d{2}-\d{2} <token: Time> \d{2}:\d{2} <token: TimeZone> Z | [+-]\d{2}:\d{2} <token: Author_Id> \w+ <token: Author_Name> [^)]+ <token: Changes> (?:\t|[ ]{8}) (\S\V*) \R (?: (?:\t[ ]{2}|\h{10}) \h* (\V+) \R )* }xms; }; $Changes =~ $parser or die "format invalide !\n"; use YAML 0.71 (); print YAML::Dump(\%/), "\n"; use Data::Dumper; print Dumper(\%/), "\n";
Subject: Re: [rt.cpan.org #54819] Perl memory corruption and crash on Ubuntu 9.10 amd64
Date: Sat, 20 Feb 2010 22:10:56 +1100
To: bug-Regexp-Grammars [...] rt.cpan.org
From: Damian Conway <damian [...] conway.org>
2010/2/20 Olivier 'dolmen' Mengué via RT <bug-Regexp-Grammars@rt.cpan.org>: Show quoted text
> The attached program (make-Changes-rss.pl) makes Perl corrupt its memory > and finally crash.
The problem is not specifically in Regex::Grammars, but seems to be in Perl's Unicode support itself. Replacing the '<:utf8' in the open command with '<' resolves the issue. Debugging then indicates that your <Time> rule is missing the leading 'T', and that your grammar works perfectly once that rule is corrected. Damian
Le Sam 20 Fév 2010 11:38:59, damian@conway.org a écrit : Show quoted text
> The problem is not specifically in Regex::Grammars, but seems to be in > Perl's Unicode support itself. Replacing the '<:utf8' in the open > command with '<' resolves the issue.
I've reported the Perl bug here: http://rt.perl.org/rt3//Public/Bug/Display.html?id=72996 -- Olivier Mengué - http://o.mengue.free.fr/
Le Sam 13 Mar 2010 06:40:28, DOLMEN a écrit : Show quoted text
> Le Sam 20 Fév 2010 11:38:59, damian@conway.org a écrit :
> > The problem is not specifically in Regex::Grammars, but seems to be in > > Perl's Unicode support itself. Replacing the '<:utf8' in the open > > command with '<' resolves the issue.
As a workaround, I'm loading the text as ':raw', feed it to Regexp::Grammars, and give the result tree to Data::Recursive::Encode. -- Olivier Mengué - http://o.mengue.free.fr/
Marking as rejected as the bug is not in Regexp::Grammars itself.