Skip Menu |

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

Report information
The Basics
Id: 60109
Status: open
Priority: 0/
Queue: Regexp-Grammars

People
Owner: Nobody in particular
Requestors: cyril.scetbon [...] free.fr
Cc:
AdminCc:

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



Subject: Segmentation fault
Date: Thu, 05 Aug 2010 19:08:03 +0200
To: bug-regexp-grammars [...] rt.cpan.org
From: Cyril Scetbon <cyril.scetbon [...] free.fr>
Hi, when I try to use this code (toto.pl) it segfaults. I've removed all the real content to get only text that can segfault. You can check that if you remove one line from $data, it works well. regards -- Cyril SCETBON

Message body is not shown because sender requested not to inline it.

Subject: Re: [rt.cpan.org #60109] Segmentation fault
Date: Fri, 6 Aug 2010 21:30:00 +1000
To: bug-Regexp-Grammars [...] rt.cpan.org
From: Damian Conway <damian [...] conway.org>
Hi Cyril, I'm afraid that this is a (known) problem within the Perl regex engine itself. I have reported it, but I don't believe that it has been fixed yet. :-( I can't even offer you a workaround (if I had one, it would already be coded into Regexp::Grammars). Adding elements to an array within a regex is the underlying problem, so if you need to parse large numbers of repetitions into an array then you may have to consider one of the other parsing modules (Parse::RecDescent or Parse::Yapp or Marpa). I'm very sorry not to have a better answer for you, Damian
From: cpan [...] bbkr.org
Cyril: I have the same problem. I can reproduce SegFault using your script on MacOS Perl 5.10.1 / 5.12.3. However it works on 5.14.1. I increased amount of elements returned from <[Element]> to 2000 and it still works fine. Damian: Can you please link RT ticket?
From: Cyril Scetbon
Great news :) Show quoted text
> Cyril: I have the same problem. I can reproduce SegFault using your > script on MacOS Perl 5.10.1 / 5.12.3. However it works on 5.14.1. > I increased amount of elements returned from <[Element]> to 2000 and it > still works fine.
From: cpan [...] bbkr.org
I'm trying to confirm now that it works on Linux 5.14.1. Note, that for 2000 elements use Data::Dumper; print Dumper $/{'content'}->{'Element'} crashes with bbkr:Developer bbkr$ perl5.14.1 toto.pl perl5.14.1(93931) malloc: *** error for object 0x7fb023805808: incorrect checksum for freed object - object was probably modified after being freed. *** set a breakpoint in malloc_error_break to debug Abort trap: 6 error message, despite that every element can be accessed without problems using index, for example $/{'content'}->{'Element'}->[2000], so this may be Data::Dumper issue.