Skip to content
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

Possible associative array bug #47

Closed
p5pRT opened this issue Jun 7, 1999 · 3 comments
Closed

Possible associative array bug #47

p5pRT opened this issue Jun 7, 1999 · 3 comments

Comments

@p5pRT
Copy link

p5pRT commented Jun 7, 1999

Migrated from rt.perl.org#849 (status was 'resolved')

Searchable as RT849$

@p5pRT
Copy link
Author

p5pRT commented Jun 7, 1999

From PASQUALI@uthscsa.edu

I am converting a perl cgi from perl-v5.001 (Solaris 2.5)`to perl-v5.005_03
(Solaris 2.6). The cgi contains code simular to that listed below.

Since this bug is causing serious problems, is there a patch or does the bug
exist in any other versions that are compitable with the Oracle 8 version of
Oraperl?

local ($a, $b, $c, %assoc);

$a = "a";
$b = "b";
$c = "c";

$assoc{one} = "11";
$assoc{two} = "22";

&print_values($a, $b, %assoc, $c);

sub print_values
{

  local($sub_a, $sub_b, %sub_assoc, $sub_c) = @​_;

  print " value passed #1 **$_[0]**\n";
  print " value passed #2 **$_[1]**\n";
  print " value passed #3 **$_[2]**\n";
  print " value passed #4 **$_[3]**\n";
  print " value passed #5 **$_[4]**\n";

  print "\n\n";

  print " sub_a **$sub_a**\n";
  print " sub_b **$sub_b**\n";
  for $key (keys %sub_assoc)
  {
  print " sub_assoc - Key​: $key Value​: $sub_assoc{$key}\n";
  }
  print " sub_c **$sub_c**\n";

  return;
}

When this code is executed by perl-v5.001 the following results are obtained.

value passed #1 **a**
value passed #2 **b**
value passed #3 **two**
value passed #4 **22**
value passed #5 **one**

sub_a **a**
sub_b **b**
sub_assoc - Key​: one Value​: 11
sub_assoc - Key​: two Value​: 22
sub_c **c**

When the code is executed by perl-v5.005_03 the following incorrect results
are obtained.

value passed #1 **a**
value passed #2 **b**
value passed #3 **two**
value passed #4 **22**
value passed #5 **one**

sub_a **a**
sub_b **b**
sub_assoc - Key​: one Value​: 11
sub_assoc - Key​: two Value​: 22
sub_assoc - Key​: c Value​:
sub_c ****

As one can see, perl has a bug such that it does not find the end of the
associative array correctly in the subroutine.

Thanks for any help in advance!
Lee

*************************************************

Lee Pasquali
Technical Director/Computer Systems Manager
The Research Imaging Center
The University of Texas Health Science Center at San Antonio
7703 Floyd Curl Dr.
San Antonio, Texas 78284

210-567-8100

pasquali@​uthscsa.edu

*************************************************

@p5pRT
Copy link
Author

p5pRT commented Jul 17, 2002

From PASQUALI@uthscsa.edu

Please not that this ticket is from 7 June 1999 and has been cleared.

Thanks

Date​: Wed, 17 Jul 2002 01​:22​:21 +0000
From​: bugs-perl5@​bugs6.perl.org
Subject​: [perl #849] AutoReply​: Possible associative array bug
To​: PASQUALI@​uthscsa.edu
MIME-version​: 1.0
Content-transfer-encoding​: 7BIT
Managed-BY​: Request Tracker 2.0.12 (http​://www.fsck.com/projects/rt/)
RT-Ticket​: perl #849
RT-Originator​: PASQUALI@​uthscsa.edu
X-RT-Loop-Prevention​: perl

Greetings,

This message has been automatically generated in response to the
creation of a trouble ticket regarding​:
"Possible associative array bug".

There is no need to reply to this message right now. Your ticket has been
assigned an ID of [perl #849].

Please include the string​:

[perl #849]

in the subject line of all future correspondence about this issue. To do so,
you may reply to this message (please delete unnecessary quotes)

Thank you,
bugs-perl5@​bugs6.perl.org

-------------------------------------------------------------------------
Received​: from jhereg.perl.com (IDENT​:root@​perl.com [199.45.135.9]) by
defender.perl.org (8.9.3/8.9.3/Debian/GNU) with ESMTP id QAA13443 for
<perlbugtron@​perl.org>; Mon, 7 Jun 1999 16​:39​:17 -0400
From​: PASQUALI@​uthscsa.edu
Received​: from elzip.uthscsa.edu (elzip.uthscsa.edu [129.111.1.11]) by
jhereg.perl.com (8.9.0/8.9.0) with ESMTP id NAA11486 for
<perlbug@​perl.com>; Mon, 7 Jun 1999 13​:02​:48 -0600
Received​: from CONVERSION-DAEMON by uthscsa.edu (PMDF V5.2-29 #33169) id
<01JC4DPGJ9W00035BV@​uthscsa.edu> for perlbug@​perl.com; Mon, 7 Jun 1999
14​:03​:05 CDT
Received​: from biad46.uthscsa.edu (biad46.uthscsa.edu [129.111.249.7]) by
uthscsa.edu (PMDF V5.2-29 #33169) with SMTP id
<01JC4DPBDLVC0032JI@​uthscsa.edu> for perlbug@​perl.com; Mon, 07 Jun 1999
14​:02​:57 -0500 (CDT)
Received​: by biad46.uthscsa.edu (SMI-8.6/SMI-SVR4) id NAA03635;
Mon, 07 Jun 1999 13​:56​:22 -0500
Date​: Mon, 07 Jun 1999 13​:56​:22 -0500
Subject​: Possible associative array bug
To​: perlbug@​perl.com
Cc​: pasquali@​biad46.uthscsa.edu
Message-Id​: <199906071856.NAA03635@​biad46.uthscsa.edu>
Content-Transfer-Encoding​: 7BIT
X-Sun-Charset​: US-ASCII

I am converting a perl cgi from perl-v5.001 (Solaris 2.5)`to perl-v5.005_03
(Solaris 2.6). The cgi contains code simular to that listed below.

Since this bug is causing serious problems, is there a patch or does the bug
exist in any other versions that are compitable with the Oracle 8 version of
Oraperl?

local ($a, $b, $c, %assoc);

$a = "a";
$b = "b";
$c = "c";

$assoc{one} = "11";
$assoc{two} = "22";

&print_values($a, $b, %assoc, $c);

sub print_values
{

    local\($sub\_a\, $sub\_b\, %sub\_assoc\, $sub\_c\) = @&#8203;\_;


    print " value passed \#1 \*\*$\_\[0\]\*\*\\n";
    print " value passed \#2 \*\*$\_\[1\]\*\*\\n";
    print " value passed \#3 \*\*$\_\[2\]\*\*\\n";
    print " value passed \#4 \*\*$\_\[3\]\*\*\\n";
    print " value passed \#5 \*\*$\_\[4\]\*\*\\n";

    print "\\n\\n";

    print " sub\_a \*\*$sub\_a\*\*\\n";
    print " sub\_b \*\*$sub\_b\*\*\\n";
    for $key \(keys %sub\_assoc\)
    \{
            print " sub\_assoc \- Key&#8203;: $key Value&#8203;: $sub\_assoc\{$key\}\\n";
    \}
    print " sub\_c \*\*$sub\_c\*\*\\n";

    return;

}

When this code is executed by perl-v5.001 the following results are obtained.

value passed #1 **a**
value passed #2 **b**
value passed #3 **two**
value passed #4 **22**
value passed #5 **one**

sub_a **a**
sub_b **b**
sub_assoc - Key​: one Value​: 11
sub_assoc - Key​: two Value​: 22
sub_c **c**

When the code is executed by perl-v5.005_03 the following incorrect results
are obtained.

value passed #1 **a**
value passed #2 **b**
value passed #3 **two**
value passed #4 **22**
value passed #5 **one**

sub_a **a**
sub_b **b**
sub_assoc - Key​: one Value​: 11
sub_assoc - Key​: two Value​: 22
sub_assoc - Key​: c Value​:
sub_c ****

As one can see, perl has a bug such that it does not find the end of the
associative array correctly in the subroutine.

Thanks for any help in advance!
Lee

*************************************************

Lee Pasquali
Technical Director/Computer Systems Manager
The Research Imaging Center
The University of Texas Health Science Center at San Antonio
7703 Floyd Curl Dr.
San Antonio, Texas 78284

210-567-8100

pasquali@​uthscsa.edu

*************************************************

*************************************************

Lee Pasquali
Technical Director/Computer Systems Manager
The Research Imaging Center
The University of Texas Health Science Center at San Antonio
7703 Floyd Curl Dr.
San Antonio, Texas 78284

210-567-8100

pasquali@​uthscsa.edu

*************************************************

@p5pRT
Copy link
Author

p5pRT commented Jul 17, 2002

@rspier - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant