On Tue, 3 Oct 2000, Bruce W. Hoylman wrote:

> 
> Hello, Doug --
> 
> Thanks for the reply.
> 
> I have already applied this patch.  The backtrace I provided was
> producted by an httpd executable with the perl_util.c patch already
> applied.  The perl 5.6 patch from p5p was also in effect.

bruce, maybe this patch will cure?

>From [EMAIL PROTECTED] Fri Oct 13 10:21:16 2000
Date: Sat, 07 Oct 2000 21:32:25 -0700
From: Gurusamy Sarathy <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: Re: CGI::Carp, use X, die in X.pm causes 0xc0000005 (APR#330) 

On Fri, 21 Apr 2000 18:12:45 PDT, [EMAIL PROTECTED] wrote:
>Full_Name: UENO Kojun
>Version: ActivePerl 613
>OS: Windows NT 4.0 SP 6
>Submission from: (NULL) (210.141.46.3)
>
>
>Following scripts cause the application error "c0000005 at address 78002f3e
>(strlen)". 
>
>% perl x.pl
>
>-------x.pl-------
>#! perl
>use CGI::Carp;
>use lib '.';
>use X;
>
>-------X.pm-------
>package X;
>die;
>1;

FYI, I just checked in the following fix for this problem.  I'm afraid
it is somewhat in the nature of a hack.  A proper fix would entail
eliminating save_re_context() and making the regular expression engine
reentrancy-safe, but I chickened out.


Sarathy
[EMAIL PROTECTED]
-----------------------------------8<-----------------------------------
Change 7165 by gsar@onru on 2000/10/08 04:15:29

        save_re_context() could reset PL_curcop to freed memory, causing core
        dumps in code such as C<use CGI::Carp; use something_that_calls_die;>

Affected files ...

... //depot/perl/pp_ctl.c#227 edit

Differences ...

==== //depot/perl/pp_ctl.c#227 (text) ====
Index: perl/pp_ctl.c
--- perl/pp_ctl.c.~1~   Sat Oct  7 21:14:39 2000
+++ perl/pp_ctl.c       Sat Oct  7 21:14:39 2000
@@ -1417,6 +1417,12 @@
 
            LEAVE;
 
+           /* LEAVE could clobber PL_curcop (see save_re_context())
+            * XXX it might be better to find a way to avoid messing with
+            * PL_curcop in save_re_context() instead, but this is a more
+            * minimal fix --GSAR */
+           PL_curcop = cx->blk_oldcop;
+
            if (optype == OP_REQUIRE) {
                char* msg = SvPVx(ERRSV, n_a);
                DIE(aTHX_ "%sCompilation failed in require",
End of Patch.

Reply via email to