FAQ

On Fri, 21 Apr 2000 18:12:45 PDT, kojun@apro.co.jp 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
gsar@ActiveState.com
-----------------------------------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.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupperl5-porters @
categoriesperl
postedOct 8, '00 at 4:33a
activeOct 8, '00 at 4:33a
posts1
users1
websiteperl.org

1 user in discussion

Gurusamy Sarathy: 1 post

People

Translate

site design / logo © 2022 Grokbase