Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the YAML CPAN distribution.

Report information
The Basics
Id: 90593
Status: resolved
Priority: 0/
Queue: YAML

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

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



Subject: Complex regular subexpression recursion limit (32766)
Hi there, we stumbled on a bug when trying to load a yaml file with more than 32766 chars as a value. Here's how to reproduce: 1.) Download the attached example YAML file and create a perl test script from: #!/usr/bin/perl use strict; use warnings; use YAML; my @File = <STDIN>; my $String = join("", @File); my $YAML = YAML::Load( $String ); 2.) Execute: cat Example.yaml | ./yourscript.pl 3.) Get Error: YAML Error: Can't parse double quoted string Code: YAML_PARSE_ERR_BAD_DOUBLE Line: 3 Document: 1 at /Library/Perl/5.16/YAML/Loader.pm line 523. More detailed error: Complex regular subexpression recursion limit (32766) exceeded at /Library/Perl/5.16/YAML/Loader.pm line 523. Caused by this line: if ($self->inline =~ /^"((?:\\"|[^"])*)"\s*(.*)$/) { Fixed with this line: if ($self->inline =~ /^"((?:(?:\\"|[^"]){0,32766}+){0,32766}+)"\s*(.*)$/) { Happens with perl 5.16 (OSX), YAML 0.84. Greetings, Thorsten // from znuny with love
Subject: Example.yaml

Message body is not shown because it is too large.

Hi Thorsten, See also: https://rt.cpan.org/Public/Bug/Display.html?id=21077 https://rt.cpan.org/Public/Bug/Display.html?id=18195 (btw a workaround would be to use YAML::XS instead of YAML - this is why OTRS has YAML::XS as a dependency!) -- Mike
fixed in 0.85
Subject: Re: [rt.cpan.org #90593] AutoReply: crash on long string [YAML #92544]
Date: Wed, 29 Jan 2014 12:24:15 -0500
To: "bug-YAML [...] rt.cpan.org" <bug-YAML [...] rt.cpan.org>
From: "Jonathan A. Marshall" <jmarshall [...] acquiremedia.com>
For example: # perl /root/.cpan/build/YAML-0.88-3Nx_t3/t/rt-90593.t 1..2 Segmentation fault # Thanks, --Jonathan On 01/28/2014 03:05 PM, Bugs in YAML via RT wrote: Show quoted text
> Greetings, > This message has been automatically generated in response to the > creation of a trouble ticket regarding: > "crash on long string [YAML #90593]", > a summary of which appears below. > > There is no need to reply to this message right now. Your ticket has been > assigned an ID of [rt.cpan.org #92544]. Your ticket is accessible > on the web at:https://rt.cpan.org/Ticket/Display.html?id=92544 > > Please include the string: [rt.cpan.org #92544] > in the subject line of all future correspondence about this issue. To do so, > you may reply to this message. > Thank you, > bug-YAML@rt.cpan.org > ------------------------------------------------------------------------- > RT#90593 claims that this bug was fixed in version 0.85. But I am still > encountering this problem in YAML version 0.88, using Perl 5.8.8. > > Simple test: just run t/rt-90593.t. It crashes at line 518, during the > invocation of $self->inline. This indicates a problem with the inline() > function. The crash does not occur at that location when I replace > $self->inline with $self->{inline}. > > Thanks and best wishes, > --Jonathan