New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bleadperl v5.19.6-171-g437e3a7 breaks ROBIN/Want-0.21.tar.gz #13470
Comments
From @andkgit bisect commit 437e3a7 Optimise out PUSHMARK/RETURN if return is the last statement in a sub. diagnostics Test Summary Report perl -V Summary of my perl5 (revision 5 version 19 subversion 7) configuration: Characteristics of this binary (from libperl): -- |
From @wolfsageOn Sat, Dec 14, 2013 at 11:22 PM, Andreas J. Koenig via RT
Some background: $ ./perl -Ilib assign.t assign.t: 32: sub backstr :lvalue { lnoreturn / rreturn from Want.pm: sub rreturn (@) { sub lnoreturn () { double_return from Want.xs: void ourcx->cx_type = CXt_NULL; return; (My knowledge in this area is very limited, apologies if this makes no sense) What it looks like to me is happening is double_return pops a stack My optimisation unfortunately removes the returns (since they're at 32: sub backstr :lvalue { What I don't know is if Want is violating some rules with regards to This patch does however fix the issue since the extra scope prevents --- Want.pm 2012-02-29 13:54:14.000000000 -0500 sub lnoreturn () { # Some naughty people were relying on these internal methods. -- Matthew Horsfall (alh) |
The RT System itself - Status changed from 'new' to 'open' |
From perl5-porters@perl.orgMatthew Horsfall wrote:
Yes, it sets things up in such a way that pp_return will pop one stack Because pp_leavesub assumes there is only one stack frame to pop, it
Why else does it exist? :-)
I think that patch should work. Will you do the honours of sub-
Applying the optimisation in those cases where the return is nested |
From @wolfsageOn Sun, Dec 15, 2013 at 9:16 AM, Father Chrysostomos <sprout@cpan.org> wrote:
Heheh, fair point.
Done. For now I've filed a pull request, I'll make an RT bug if he I've taken this the ticket for now. Thanks, -- Matthew Horsfall (alh) |
From @wolfsageThe module author has accepted the patch and pushed a new version: http://search.cpan.org/~robin/Want-0.22/ Closing. -- Matthew Horsfall (alh) |
@wolfsage - Status changed from 'open' to 'resolved' |
From @andk"Matthew Horsfall via RT" <perlbug-followup@perl.org> writes:
Maybe to be reopened. Another affected module is JJORE/overload-eval-0.10.tar.gz -- |
From @iabynOn Fri, May 02, 2014 at 07:43:28PM +0200, Andreas Koenig wrote:
I see test failures with that module prior to that commit. -- |
From @andk"Dave Mitchell via RT" <perlbug-followup@perl.org> writes:
Why so terse? At cpantesters? URL? Commit ID? -- |
From @andkAndreas Koenig <andreas.koenig.7os6VVqR@franz.ak.mind.de> writes:
There is no red below the 5.19.7 row in the matrix: http://matrix.cpantesters.org/?dist=overload-eval%200.10 -- |
From @iabynOn Wed, May 07, 2014 at 06:55:38AM +0200, Andreas Koenig wrote:
Sorry, I meant that I downloaded the module locally, and tried building But having tried to reproduce it just now, I'm no longer seeing test I'll look into this further. -- |
From @iabynOn Wed, May 07, 2014 at 12:17:48PM +0100, Dave Mitchell wrote:
TL;DR: its not a regression from 5.18. The commit in question (which just optimises 'return expr' at the end of a After that commit, you get an assertion failure in t/basic.t due to a sub wantarray { The offending commit logically converts the sub into sub wantarray { which causes the assertion failure. *But*: you get this failure As to what the underlying issue is, I'm not exactly sure. The basic thing $ p -Dst -e'eval "5;"' .... (-e:1) entereval Normally this is isn't an issue, but with overload::eval allowing you to Whether that's an issue for overload::eval or perl, I don't know. -- |
Migrated from rt.perl.org#120792 (status was 'resolved')
Searchable as RT120792$
The text was updated successfully, but these errors were encountered: