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;
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;
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 [email protected] 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.