You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Doug MacEachern <do...@covalent.net> on 2000/06/01 20:47:41 UTC

Re: Bugs 5.6.0 modperl use?

On Thu, 25 May 2000, Jeremy Howard wrote:

> > CGI::Carp preloaded.
> > DBI preloaded.
> > 
> > [Wed May 24 19:58:28 2000] [error] PerlRun: `Bizarre copy of HASH in aassign
> > at /usr5/perl/lib/5.6.0/Carp/Heavy.pm line 79.
> > 
> > ...
> > Anyone else seen these?
> 
> Oh yes, I've been battling that tonight...
> 
> Do the following:
> 
> In Carp::Heavy, change 'DB' to 'DB_tmp':
> Line 39: while (do { { package DB_tmp; @a = caller($i++) } } ) {
> Line 79: @a = @{DB_tmp::args}; # must get local copy of args
> 
> In CGI::Carp, change Line 257:
> FROM: my $message = shift;
> TO: my ($message) = @_;
> 
> Yes, this really does matter--I carefully reproduced a problem that only
> occured when 'shift' was used!

do you have small test case to reproduce this bug?  i wasn't able to, but
poked around a bit and see:

#Carp.pm:
sub longmess {
    { local $@; require Carp::Heavy; }	# XXX fix require to not clear $@?
    goto &longmess_heavy;
}   ^^^^

and perl.c:call_sv():
PL_eval_root = PL_op;             /* Only needed so that goto works right.*/

which leads me to think goto() + call_sv() (which is how mod_perl
invokes handlers) can lead to trouble, we just need to figure out exactly
what is tripping it up.  it's not clear from the module changes you made
to bandaid the bug, i'd like to be able to reproduce this and step in with
gdb.  i have a feeling it's something to do with AUTOLOAD+eval "" changing
PL_eval_root, but i can only guess at this point.