hedgehog_p has asked for the wisdom of the Perl Monks concerning the following question:

Hello,

I have written a small CGI application. During my tests I have found that it works fine on perl 5.8.3 on my local computer (Fedora Core 2)

On my second test platform 5.8.6 (FC 3) it also works fine.
On my third test platform 5.8.1 (RH 9) it also works fine.

On my third test platform I am getting the following error message:

panic: pad_free

Seems to be due to a problem with Perl being confused about which scratch pad to use.

This is the first time I get this error and I would appreciate any tips you could provide.

Thanks a lot,
Hedgy

Replies are listed 'Best First'.
Re: panic: pad_free
by dave_the_m (Monsignor) on Mar 23, 2005 at 14:50 UTC
    If it occurs with an application that dosn't use any third-party extensions, then it's a bug in perl. You say that the third plaform "works fine" but that the error also occurs on the third platform, so I'm not entirely certain whether the problem is with perl 5.8.1 or not.

    Anyway, if it's an older version of perl, you can avoid the problem by upgrading; if it's on a newer version, then try to to strip your code down to a simple reproducable case and report it as a bug.

    Dave.

Re: panic: pad_free
by brian_d_foy (Abbot) on Mar 23, 2005 at 15:50 UTC

    What's the rest of the story? Which web server are you using on which system in the third example? Can you re-create the error in a regular (non-web-server-executed) script? How are you testing this thing?

    On the problemed platform, does the script give that error for other versions of perl?

    --
    brian d foy <bdfoy@cpan.org>
Re: panic: pad_free
by hedgehog_p (Initiate) on Mar 26, 2005 at 00:47 UTC
    Hello again,
    Thanks for your help.

    Seems I posted my reply in the wrong place. : (

    I am testing at the command prompt. I do not find the error page apache is spitting out to be very informative :)

    So far I have the following results.

    The application is running fine in source form on Perl 5.6.1

    when encoded with Acme::Eyedrops however the application is giving up before the complete HTML is generated just before the final </html>


    It is giving the following error:
    <input type='submit' Value='Send'></form> </p> Segmentation fault (core dumped)

    I am still trying to isolate the panic: pad_free error on perl 5.8.1 but so far it seems to me that error is due to redhat 7.3 and perl combined and seems to be an installation problem.

    Any ideas about how to solve the Acme::EyeDrops problem?

    If the problem is due to Acme::Eyedrops itself, is there any other quick way to hide or hopefully objuscate the code?


    Thanks : )

    Hedgy

      What version of Acme::EyeDrops are you using? This sounds like perl RT bug #23143, namely:

      The following program works under Perl 5.8.0 but fails under 5.8.1-RC2 with the error: "panic: pad_free curpad".
      ''=~m<(?{eval'print 4;$_=9'})>;($_)=9;
      If you change it to:
      ''=~m<(?{eval'print 4;$_=9'})>;$_=9;
      it works fine.
      This perl bug was worked around in Acme::EyeDrops 1.42 and later, by never using $_ in filler code.