Re: Prototype mismatch (solved??)
>Well I kind of figured out the problem... partially. First, the code I
>> I have solved the previoud error, but I am not exactly sure how :-)
> Your solution looks like it has nothing to do with the original
> problem reported by perl. This might be the case of this being just
> some odd perl bug type thing that you worked around. Every now and
> then ( maybe once a year ), I run into one such bug that I
> can isolate down to a line, and if I just tweak that line
> of code somewhat things start to work again mysteriously.
> Maybe this was one of those mystery bugs? :)
copy-pasted was not the one I wanted to :-) Well, partially it was....
Ehhh, it would be too difficult to explain ... whatever. Let me explain!
First, this is the real error (in the logs):
"Attempt to free non-existent shared string '...string...string...'"
After this, everything goes out of the window.
It looks like this error is not a random one: it can be reproduced. I
have faced this error in a previous install (with Perl 5.6) too. Now I
have a completely new install with Perl 5.8 - still the same problem. To
me it looks like passing a reference back from a subroutine is sometimes
not OK in a mod_perl environment. When I do this:
it does not work. When I do this
it does work! And the miracle now: if I use
then in the caller
my $ref = &get_langfile($file);
my $regain = Dumper($ref);
eval ($regain); # Dumper return $VAR1
my $hs = $VAR1;
it works again.
Unbelievable :-) You know what? It looks like an error that you can have
when you return a pointer in C which points to a local variable. Maybe
PERL garbage-collects the variable I return? return %hash returns a list
(AFAIK), which always returns values, not references, which work.
Here, I have found another interesting thing:
> Hello all.that error can only be triggered during child_exit(), which calls
> > What exactly means this error (from my error_log )
> > "Attempt to free non-existent shared string during global destruction. "
> > It is from a big CGI ported in mod_perl. Unfortunately i haven`t written it
> (the CGI, not mod_perl :-) ) and i`d like to have some more explication on
> this error to search it in the source.
perl_destruct(). what version of Perl are you running? any xs modules in
This might help. Other than that... it works now, and I am happy - but also a bit scared :-)))
To unsubscribe, e-mail: asp-unsubscribe@...
For additional commands, e-mail: asp-help@...