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
Better-written-as-warning missing on delete #15804
Comments
From @andkThis bug was discovered by investigating Expected behaviour: Observed behaviour: Bisect points to v5.19.3-506-g429a25554a: commit 429a255 Reduce false positives for @hsh{$s} and @ary[$s] warnings perl -V Summary of my perl5 (revision 5 version 19 subversion 4) configuration: Characteristics of this binary (from libperl): -- |
From @jkeenanOn Thu, 12 Jan 2017 12:13:16 GMT, andreas.koenig.7os6VVqR@franz.ak.mind.de wrote:
Confirmed. ##### $ perl -le 'use warnings "syntax"; delete @a[$x]; delete @a{$x};print "Bye"' ##### $ perl -v | head -2 | tail -1 $ perl -le 'use warnings "syntax"; delete @a[$x]; delete @a{$x};print "Bye"' ##### -- |
The RT System itself - Status changed from 'new' to 'open' |
From @hvdsOn Thu, 12 Jan 2017 04:13:16 -0800, andreas.koenig.7os6VVqR@franz.ak.mind.de wrote:
Hi Andreas, why do you think it was wrong for the warning to go away in this case? The intent of that commit was to reduce false positives by (among other things) not giving it when the context is list mode, as in your example. As it happens, for the case of the offending source line: Hugo |
From @andk
> On Thu, 12 Jan 2017 04:13:16 -0800, andreas.koenig.7os6VVqR@franz.ak.mind.de wrote:
> Hi Andreas, why do you think it was wrong for the warning to go away > As it happens, for the case of the offending source line: Oh, your point of view is interesting. But I do not believe removing the Look for a comparison at other list ops C<print> or C<utime>. Warning : perl -le 'use warnings "syntax"; print @a[$x]; print @a{$x};print "Bye"' : perl -le 'use warnings "syntax"; utime 0,0,@a[$x]; utime 0,0, @a{$x};print "Bye"' -- |
From @hvdsOn Fri, 13 Jan 2017 04:05:43 -0800, andreas.koenig.7os6VVqR@franz.ak.mind.de wrote:
Thanks, that helps motivate where to look. This appears to happen because Perl_ck_delete() nulls out the ASLICE (or HSLICE) op before it gets as far as checking for this warning during S_finalize_op(). I see we can use o->op_targ to check the original type of a nulled op. I've no idea if this is appropriate, but the approach below does reenable the warnings: % ./miniperl -Ilib -Mwarnings=syntax -e 'delete @a[$b]; delete @a{$b}' Father C., does this look sane to you? Hugo + if (type == OP_NULL) case OP_SUBST: { |
From @cpansproutOn Thu, 12 Jan 2017 04:13:16 -0800, andreas.koenig.7os6VVqR@franz.ak.mind.de wrote:
This is now fixed in commit fe7df09. -- Father Chrysostomos |
@cpansprout - Status changed from 'open' to 'pending release' |
From @cpansproutOn Fri, 13 Jan 2017 05:47:20 -0800, hv wrote:
Sorry, I totally missed your discussion and did not realise you were already working on it. (I started working on it before you sent your first message, and then I did not bother reading p5p in the mean time.)
Pretty much equivalent to what I committed yesterday. Sorry about the duplicate effort. -- Father Chrysostomos |
From @hvdsOn Sat, 14 Jan 2017 10:01:36 -0800, sprout wrote:
No worries, happy to have it fixed. Hugo |
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#130546 (status was 'resolved')
Searchable as RT130546$
The text was updated successfully, but these errors were encountered: