Closed jkeenan closed 1 year ago
This is a sort of half-your-bug-half-our-bug kind of bug. :-)
The half our bug part is that in any existent perl eval STRING may fail to compile in such a way that it does or does not trigger the $SIG{__DIE__}
handler in place when the eval started. If the way that the compilation fails tiggers a Perl_croak() internally then $SIG{__DIE__}
is triggered, and only certain error types will trigger a Perl_croak at all, and sometimes only after there have been more than a certain threshold of errors. In some cases compilation "can run off the end of the source" without encountering enough errors to trigger the Perl_croak(), in which case $SIG{__DIE__}
is not triggered. (I have a patch to fix this in https://github.com/Perl/perl5/pull/20357).
This means any code that uses $SIG{__DIE__}
to upgrade errors into exception objects will not get triggered reliably by eval STRING
, and $@
will not end up with an object inside of it consistently.
The code that fails with the stop on first error is testing evaling a snippet that does NOT trigger $SIG{__DIE__}
in older perls, but which does trigger $SIG{__DIE__}
in the latest perl. This is causing the code to end up with an object, which it isnt expecting and the code gets confused. But even without the latest perl slightly different code would produce the same result.
So the "half-your-bug" part is that the test is testing for only one possibly existing eval failure mode, and it does not test the other one, which happens to fail outright. Essentially you are only testing the first of the following two cases:
$ perl -le'$SIG{__DIE__}=sub { print "in __DIE__"; }; eval "1+;"; print $@'
syntax error at (eval 1) line 1, at EOF
$ perl -le'$SIG{__DIE__}=sub { print "in __DIE__"; }; eval "1+;" x 10; print $@'
in __DIE__
syntax error at (eval 1) line 1, at EOF
syntax error at (eval 1) line 1, at EOF
syntax error at (eval 1) line 1, at EOF
syntax error at (eval 1) line 1, at EOF
syntax error at (eval 1) line 1, at EOF
syntax error at (eval 1) line 1, at EOF
syntax error at (eval 1) line 1, at EOF
syntax error at (eval 1) line 1, at EOF
syntax error at (eval 1) line 1, at EOF
syntax error at (eval 1) line 1, at EOF
(eval 1) has too many errors.
Ping?
Thanks for the reminder. This is fixed in 1.60.
A change in Perl 5 blead has begun to trigger test failures in HTML-Mason's test suite. These failures have been reported as a "Blead Breaks CPAN" issue to Perl's issue tracker as https://github.com/Perl/perl5/issues/20291. For a sample CPANtesters failure report, see http://www.cpantesters.org/cpan/report/a00f2282-32c1-11ed-bfe4-38c706b3d53a.
The test failures look like this:
I'm not familiar with this distribution's test suite, but this may be a case where a regression test has an overly rigid expectation of what error output the perl interpreter will produce. If so, then the test could be skipped or modified to be more lenient with respect to the output expects.
However, the plot thickens. The output that the test was expecting (and that up until now
perl
was presumably producing) may in itself have been buggy. This even newer ticket in the Perl 5 bug queue should be examined: https://github.com/Perl/perl5/issues/20296.Thank you very much. Jim Keenan