Red Hat Bugzilla – Bug 676547
Large number of string evals makes interpreter emit syntax error [perl #83364]
Last modified: 2016-05-31 21:41:10 EDT
Description of problem: Upstream [perl #83364] affects perl 5.8 and perl 5.10 but will only be fixed in 5.12 by perl5-porters. Reporter requests backport of upstream fix into Redhat perl 5.8 and perl 5.10. Version-Release number of selected component (if applicable): Reproduced on perl 5.8.8, 32 and 64 bit (see [1]). Steps to Reproduce: Proof of concept code in [1]. Typically takes 2-8 wall clock hours to reproduce. Additional info: [1] http://rt.perl.org/rt3//Public/Bug/Display.html?id=83364
Most probably for 5.8.8 will be needed more patches than these. Patches are part of perl-5.13.11.
It seems to be fixable by patch d1bfb649a8c4cc0b39b0fd6371c009b71c0b497f (maint-5.12). Other patches cleaned the code, but they are not easily applicable on 5.8.x. As test could be used code: $ cat eval.pl use strict; use warnings; my $c; print 'start: ' . scalar localtime(); for ($c = 0; !$@; $c++) { eval 'my $abc = 1; $abc++; '; } print $c . ' ' . $@; print 'end : ' . scalar localtime(); __END__ Other tests could be found in original report, but sadly it takes few hours to reproduce.
Created attachment 522868 [details] modified patch from maint-5.12
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Cause Large number of string evaluation. Consequence Large number of string evaluation makes interpreter emit syntax error. Fix The variable used within string evaluation had too small value. The upstream patch, which enlarge this value, was backported. Result Large number of string evaluation does not make interpreter emit syntax error.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2012-0199.html