-
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
Array names starting with 'Inf' can be poorly behaved. #16335
Comments
From @khwilliamsonI am posting this for Dan Book, who is having trouble getting email to The build options and version of perl is immaterial here, except since 5.22. When the warning "Scalar value @arrayname[0] better written as use warnings; Error from above code (since 5.22): Cannot printf Inf with 'c' at (IRC) |
From @cpansproutOn Fri, 22 Dec 2017 09:41:56 -0800, public@khwilliamson.com wrote:
$ ../perl.git-copy/Porting/bisect.pl --target=miniperl --start=v5.20.0 --end=v5.22.0 -- ./miniperl -Ilib /tmp/foo infnan: Simplify inf parsing. :100644 100644 66b08834448704597e416e7f3a024b8329245bd0 7819c60d94adac3f7b96b11ed816cc12d57b1a27 M numeric.c -- Father Chrysostomos |
The RT System itself - Status changed from 'new' to 'open' |
From @cpansproutOn Fri, 22 Dec 2017 13:40:33 -0800, sprout wrote:
That commit only changed grok_infnan. I don‘t understand why this (from op.c:scalar_slice_warning) calls grok_infnan: if (key) -- Father Chrysostomos |
From @jkeenanOn Fri, 22 Dec 2017 17:41:56 GMT, public@khwilliamson.com wrote:
Bisection points to: ##### infnan: Simplify inf parsing. |
From @cpansproutOn Fri, 22 Dec 2017 14:01:29 -0800, jkeenan wrote:
If I change the array name to @inf, then it points to me: 354b74a is the first bad commit [perl #12285] Fix str vs num inf/nan treatment That commit corrected much wrong logic, but missed one bit. The result was that any time perl’s printf mechanism is called at the C level (not directly from Perl code) with a format containing %s followed by a numeric format, it will croak if the string is ‘inf’. $ ./perl -Ilib -we 'sub in; @{in}' -- Father Chrysostomos |
From zefram@fysh.orgFixed in commit 0498098. -zefram |
@iabyn - Status changed from 'open' to 'pending release' |
From @cpansproutOn Sat, 23 Dec 2017 01:14:38 -0800, zefram@fysh.org wrote:
You ninjaed me. :-) I think the code is still fragile. The problem is that every other code path checks args for truth. But this one path, added by Jarkko in 540a63d, checks argsv for truth instead of !args. -- Father Chrysostomos |
From @khwilliamsonThank you for filing this report. You have helped make Perl better. With the release yesterday of Perl 5.28.0, this and 185 other issues have been Perl 5.28.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#132645 (status was 'resolved')
Searchable as RT132645$
The text was updated successfully, but these errors were encountered: