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
Undef loop while condition, loop code motion, and bad warning line number? 5.10-RC1 + 5.8.8 #9127
Comments
From William.Ricker@FMR.COMCreated by a273121@fmr.comSummary - A uninitialized undef Value in User ID -- a273121@fmr.com on Linux = William.Ricker@FMR.com more generally Version + BugLevel - BOTH 5.10-RC1 (Linux) + 5.8.8/5.9.5 (Windows), possibly others. "Medium" may be over-high for a misleading warning that 5.10 *has* Figured we should send it in during 5.10-RC1 so you have a chance to get Speculation - This may be related to code-motion optimization in loop, as it uses the Background / detail - A user adopting a complex non-CPAN published module (COBOLIO.pm) Inserting !defined in loop control expression of the loop of which (This *will* [has been?] be reported to module author separately as a Using locally built 5.9.5 (Windows) or 5.10.0_RC1 (Linux) gives a REPRODUCTION TESTCASE -- Our first attempt to remove all other bits of the module to make Here's the simple reproduction that tricks it into appearing. [perl-5.10.0-RC1]$ cat bad2.pl use strict; our @recLevel= (); sub foo { } foo();===EOF=== [perl-5.10.0-RC1]$ perl510 bad2.pl Note there is no $currLevel in line #14. (If not using $c temp, IMPACT UNDER 5.8.8 -- If any other uses of '>' occur in loop, the 5.8.8 version of this Use of uninitialized value in numeric gt (>) at bad2.pl line 14. Which is even more misleading. This confusion was such that our user Perl Info
|
From @schwernRicker, William (via RT) wrote:
Thanks for your very through report. This is like a consequence of a very old issue that nobody's quite figured out However, I notice that 5.6.2 got this right. Andreas, could you apply your -- |
The RT System itself - Status changed from 'new' to 'open' |
From @andk
> Ricker, William (via RT) wrote:
> Thanks for your very through report. > This is like a consequence of a very old issue that nobody's quite figured out > However, I notice that 5.6.2 got this right. Andreas, could you apply your 19610 looks very suspicious: Change 19610 by jhi@kosh on 2003/05/24 06:42:52 Subject: [PATCH #2] Re: [perl #22181] goto undefines my() variables ----Program---- use strict; our @recLevel= (); sub foo { } foo(); ----Output of .../poKIX8P/perl-5.8.0@19608/bin/perl---- ----EOF ($?='0')---- ----EOF ($?='0')---- -- |
From @iabynOn Fri, Nov 23, 2007 at 10:45:32PM +0100, Andreas J. Koenig wrote:
This is mainly a red herring. The basic problem is that line numbers are The real fix is to record the line number in every op, at the cost of -- |
From @nwc10On Sat, Nov 24, 2007 at 01:28:31AM +0000, Dave Mitchell wrote:
Or at least in every op where the line number changed. Could one get away with a null op in the same family as nextstate that would Nicholas Clark |
From William.Ricker@FMR.COM1) Obviously I intend a newline (or #) after foo(); and before 2) Same result with perl-5.10-RC2 [although RC2 was harder to build while($currLevel > $level) { # 12 3) Before someone asks, Yes, 'make test' succeeds on my RC1 & RC2 Linux 4) I finally found an AIX5.3 development system with the newer VAC 6 William Ricker |
From William.Ricker@FMR.COMMichael, Andreas, Dave, Nick -- Thanks for the great explanation. We are not surprised that it's not an easy fix for 5.10.0; that's pretty I have not come up with an example that is not erroneous; but then, [for BCC:'s - see discussion at Cheers, BILL in Boston William Ricker |
Migrated from rt.perl.org#47632 (status was 'open')
Searchable as RT47632$
The text was updated successfully, but these errors were encountered: