Re: Bug in debugger (or my code): Bizarre copy of ARRAY...



Peter Scott wrote:
> On Tue, 04 Oct 2005 04:46:36 -0700, vnick@xxxxxxxxxx wrote:
> > Bizarre copy of ARRAY in leave at testtest.pl line 65.
> [snip]
> > So the question is why Perl (5.8.5) only reports this bizarre error
> > when I use the debugger?? Do I still have a bug in my code though it
> > works and I do not see where it could be or is that a debugger bug?
>
> If you can reduce this to a *much* shorter example and demonstrate it on
> the latest version of perl, please report it to the Perl 5 Porters list.
> While bugs like this in the debugger are notoriously difficult to fix,
> the bug report will be accepted. It should be impossible to get this
> message by accident regardless of poor programming practices.

#!/usr/bin/perl -d
use strict;
use warnings;

my $i;
my $aref = [1..10];
for ($i=0; $i<=$#{@$aref}; $i++){
print "$i: $aref->[$i]\n";
}

__END__

$ ./clpm.pl
Default die handler restored.

Loading DB routines from perl5db.pl version 1.07
Editor support available.

Enter h or `h h' for help, or `man perldebug' for more help.

main::(./clpm.pl:5): my $i;
DB<1> c
Bizarre copy of ARRAY in leave at ./clpm.pl line 7.
Debugged program terminated. Use q to quit or R to restart,
use O inhibit_exit to avoid stopping after program termination,
h q, h R or h O to get additional info.
DB<1>


(I'll send this to the porters as well)

Paul Lalli

.



Relevant Pages

  • Re: Bug in debugger (or my code): Bizarre copy of ARRAY...
    ... Your code looks very much like Perl 4. ... > After switching the debugger on: ... I have no idea why they syntax you used doesn't report an error or ... > Do I still have a bug in my code though it works and I do not see where it ...
    (comp.lang.perl.misc)
  • Re: Bug in debugger (or my code): Bizarre copy of ARRAY...
    ... Do I still have a bug in my code though it ... > works and I do not see where it could be or is that a debugger bug? ... the latest version of perl, please report it to the Perl 5 Porters list. ...
    (comp.lang.perl.misc)
  • Re: IEEE NaN screwed up?
    ... > It's often easier to simply use the 'perlbug' program that ships with ... > every perl. ... That way the report also gets assigned a bug ID and is ...
    (comp.lang.perl.misc)
  • Re: FAQ 1.12 Whats the difference between "perl" and "Perl"?
    ... " Perl not only stands for the Practical Extraction and Report ... " Language, but it also stands for the Pathologically Eclectic ...
    (comp.lang.perl.misc)
  • Re: Handling errors when working with files
    ... where you can see that first I show the normal perl errors variables, ... VMS, OS/2, and Win32. ... Most Win32-specific code will report errors via $^E. ... portable Perl code will report errors via $!. ...
    (perl.beginners)