Bug 25618 - Field Count Failing Intermittently
Summary: Field Count Failing Intermittently
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: perl (Show other bugs)
(Show other bugs)
Version: 7.0
Hardware: i386 Linux
high
high
Target Milestone: ---
Assignee: Crutcher Dunnavant
QA Contact: David Lawrence
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-02-02 04:39 UTC by Chris Cogdon
Modified: 2005-10-31 22:00 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-02-02 05:03:28 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Chris Cogdon 2001-02-02 04:39:11 UTC
I am receiving some very weird errors from the Perl-based UBB code that 
was recently moved to a machine running redhat-7.0 and perl 5.6.0, from 
redhat-6.2 with perl 5.00503. I've narrowed the problem down to the 
following small snippet of code:

#! /usr/bin/perl

$maxfields = 14;


sub OpenFile {
my $FilePath = shift;

my @thisarray = [];
if (-e "$FilePath") {
open (THISONE, "$FilePath") or die( &StandardHTML("OpenFile $FilePath 
failed: $!<p>Check Paths & Permissions") );
@thisarray = <THISONE>;
close (THISONE);
}  else {
@thisarray = "";
}
return(@thisarray);
}

@f = OpenFile ( "test" );
print "count=$#f\n";
print "@f";

while(1) {

        @fields = OpenFile ( "test" );
        $count = $#fields;
        if ( $count > $maxfields ) {
                print "Fields exceeded $count>$maxfields\n";
        }

}


Where the file "test" contains:
1
2
3
4
5
6
7
8
9
10
11
12
13
14


The code will occasionally print out 'Fields exceeded 13>14', which is 
simply ludicrous :)

Comment 1 Chris Cogdon 2001-02-02 04:52:24 UTC
Tried the same code on a freebsb box, running perl 5.6.0, and it works fine.

Comment 2 Chris Cogdon 2001-02-02 05:03:24 UTC
Dropped perl-5.6.0-11.i386.rpm onto the system (from fisher), and the problem 
goes away.

Comment 3 David Lawrence 2001-02-13 22:50:21 UTC
Could not recreate the problem using the sample code with perl-5.6.0-11. User
has stated this version also fixes the problem for him. Closing the report.


Note You need to log in before you can comment on or make changes to this bug.