summaryrefslogtreecommitdiff
path: root/scope.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-06-23 14:11:20 +0000
committerNicholas Clark <nick@ccl4.org>2005-06-23 14:11:20 +0000
commit94010e71b67db04027249ff69e2a2bfa9a050945 (patch)
tree3288295ac02b3ed67238e92114987299ead8ffc3 /scope.c
parent771ba71a7bf3673decf297992c8591f2ff873802 (diff)
downloadperl-94010e71b67db04027249ff69e2a2bfa9a050945.tar.gz
Add a define PERL_POISON which tries to trip up anything accessing
freed or uninitialised memory. Currently only Poison()s freed pointers. p4raw-id: //depot/perl@24959
Diffstat (limited to 'scope.c')
-rw-r--r--scope.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/scope.c b/scope.c
index 7e2b129b04..e656ff9fdf 100644
--- a/scope.c
+++ b/scope.c
@@ -781,7 +781,7 @@ Perl_leave_scope(pTHX_ I32 base)
ptr = SSPOPPTR;
gv = (GV*)SSPOPPTR;
if (SvPVX_const(gv) && SvLEN(gv) > 0) {
- Safefree(SvPVX_const(gv));
+ Safefree(SvPVX_mutable(gv));
}
SvPV_set(gv, (char *)SSPOPPTR);
SvCUR_set(gv, (STRLEN)SSPOPIV);