summaryrefslogtreecommitdiff
path: root/XSUB.h
diff options
context:
space:
mode:
authorMarcus Holland-Moritz <mhx-perl@gmx.net>2008-11-08 12:38:36 +0000
committerMarcus Holland-Moritz <mhx-perl@gmx.net>2008-11-08 12:38:36 +0000
commit414bf5ae0886eb91e2f6dbb35893ddb012852bef (patch)
treef12b56f04e73f7a435907e3ad3b060d2a96975a4 /XSUB.h
parent2556f95e0f4f5e8e95c9766374614ab52edefe3d (diff)
downloadperl-414bf5ae0886eb91e2f6dbb35893ddb012852bef.tar.gz
Assigning to DEFSV leaks if PL_defgv's gp_sv isn't set.
As Nicholas already noted in a FIXME, assigning to DEFSV should use GvSV instead of GvSVn. This change ensures that, at least under -DPERL_CORE, DEFSV cannot be assigned to and introduces a DEFSV_set macro to allow setting DEFSV. This fixes #53038: map leaks memory. p4raw-id: //depot/perl@34776
Diffstat (limited to 'XSUB.h')
-rw-r--r--XSUB.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/XSUB.h b/XSUB.h
index 46e9c292c0..2d95b1e702 100644
--- a/XSUB.h
+++ b/XSUB.h
@@ -364,10 +364,10 @@ Rethrows a previously caught exception. See L<perlguts/"Exception Handling">.
SAVETMPS ; \
SAVEINT(db->filtering) ; \
db->filtering = TRUE ; \
- SAVESPTR(DEFSV) ; \
+ SAVE_DEFSV ; \
if (name[7] == 's') \
arg = newSVsv(arg); \
- DEFSV = arg ; \
+ DEFSV_set(arg) ; \
SvTEMP_off(arg) ; \
PUSHMARK(SP) ; \
PUTBACK ; \