in reply to Bizarre copy of ARRAY in sassign at /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/Apache/perl5db.pl line 3731

You normally get this sort of error if you're printing a stack backtrack including function args, and one one of the args has been freed and since re-allocated (this can happen because the perl stack isn't reference counted, which is a long-standing bug).

So something like the following (which doesn't reproduce the error in this case, but gives you an idea of what can happen):

use Carp; @a = (1,2); foo(@a); sub foo { @a = (); Carp::cluck(); }
Dave.
  • Comment on Re: Bizarre copy of ARRAY in sassign at /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/Apache/perl5db.pl line 3731
  • Download Code

Replies are listed 'Best First'.
Re^2: Bizarre copy of ARRAY in sassign at /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/Apache/perl5db.pl line 3731
by PerlOnTheWay (Monk) on Aug 22, 2011 at 15:31 UTC
    Is there any work around to this kind of issue?
      is there any work around to this kind of issue?
      Well in general terms, avoid freeing anything that's still in use as a function argument, or avoid dumping function arguments on error.

      Dave.

        How to avoid dumping function arguments on error?

        Now it's happening automatically..