-
Notifications
You must be signed in to change notification settings - Fork 540
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
Perl_ck_refassign: Assertion `left->op_type == OP_SREFGEN' failed (op.c:10498) #15285
Comments
From @geeknikperl -e '0,!n||!\r=0' triggers an assertion failure in Perl v5.24.0-RC1-2-gde1d2c7. This bug was found with American Fuzzy Lop. Program received signal SIGABRT, Aborted. Perl v5.14.2 fails with this message: |
From zefram@fysh.orgBrian Carpenter wrote:
The initial "0," is not required, but all of the rest is. The assertion $ perl -le '$a = !n||!\r; print $a || "false"' This clearly should have printed "false". Nearby expressions behave $ perl -le '$a = !"n"||!\r; print $a || "false"' -zefram |
The RT System itself - Status changed from 'new' to 'open' |
From @arcZefram <zefram@fysh.org> wrote:
Thanks — your analysis there let me work out what was going on here. Other incorrect cases include: $ perl -le 'print scalar( !r || !n )' This bug is fixed in blead by f15d058: [perl #127952] misoptimization for negated constant-ish on lhs of logop Negations were being incorrectly deleted from the op tree for an OP_AND or The symptom in the reported case was an assertion failure in ck_refassign The underlying cause is that two optimisations in S_new_logop() were The other optimisation looks at the left-hand arm, and if it's a constant at use constant DEBUG => …; because it allows the entire statement to be eliminated when DEBUG is false. When both conditions were true simultaneously, the De Morgan optimisation This is, however, a very rare situation: it requires the lhs to be an OP_NOT - The constant is a bareword (since even though barewords are constants, - The constant is hidden inside one or more layers of do{} (since that The fix is much simpler than the explanation: apply the optimisations in the -- |
@arc - Status changed from 'open' to 'pending release' |
From @khwilliamsonThank you for filing this report. You have helped make Perl better. With the release today of Perl 5.26.0, this and 210 other issues have been Perl 5.26.0 may be downloaded via: If you find that the problem persists, feel free to reopen this ticket. |
@khwilliamson - Status changed from 'pending release' to 'resolved' |
Migrated from rt.perl.org#127952 (status was 'resolved')
Searchable as RT127952$
The text was updated successfully, but these errors were encountered: