Actually, there are likely bugs in Perl. Using mod_perl results in instances of the Perl interpreter running for quite a long time doing quite a variety of things. This can shake out bugs that are hard to reproduce.

When running mod_perl, I've seen particular instances of the Perl interpreter get into states where regex matching just doesn't work quite right any longer, to pick one example.

I'm not terribly surprised that after 1e9 string evals, you often collect enough entropy that things that should work rather mysteriously no longer work.

The solution of restarting is pretty much a best practice:

exec( $^X, $0, @ARGV ); die "Can't exec self: $!\n";

I'd also question why one has a need to do 1e9 string evals. This concern is increased by the statement "evals that previously worked all of a sudden fail" which seems to indicate that the evals are being given the same strings over and over.

Running string eval on the same string more than once makes me suspect that perhaps block eval should have been used instead. Or perhaps string eval should be used to make a sub that can be called over and over. But it can be little more than speculation, of course.

Update: And I doubt that the eval count being close to 1e9 is significant. You could make a tiny, stand-alone demonstration that just does string evals and see when it falls over. If the count were close to ~0 or ~0/2 or even if it had just passed 1e9-1, then I could see how it might be a limit.

- tye        


In reply to Re^2: Interpreter eval counter out of bounds (perl bugs) by tye
in thread Interpreter eval counter out of bounds by andreas1234567

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.