summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2014-02-16 12:43:42 -0800
committerFather Chrysostomos <sprout@cpan.org>2014-02-16 13:06:31 -0800
commit90a04aed2328e6eb9574bec97888e5929ede257d (patch)
treef3ccc13f1aa3f8ff9d6e87ec988a170ddcd83d10 /util.c
parentbfb2a8f90476eee2c32387320b53f4f8aeead825 (diff)
downloadperl-90a04aed2328e6eb9574bec97888e5929ede257d.tar.gz
[perl #121255] Call set-magic when setting $DB::sub
Otherwise UTF8 length caches will not be reset, resulting in panicks when ${^UTF8CACHE} is -1 or wrongs answers from length($DB::sub) when ${^UTF8CACHE} is 1.
Diffstat (limited to 'util.c')
-rw-r--r--util.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/util.c b/util.c
index 6dc39f0a49..5541ac9e14 100644
--- a/util.c
+++ b/util.c
@@ -5334,6 +5334,7 @@ Perl_get_db_sub(pTHX_ SV **svp, CV *cv)
(void)SvIOK_on(dbsv);
SvIV_set(dbsv, PTR2IV(cv)); /* Do it the quickest way */
}
+ SvSETMAGIC(dbsv);
TAINT_IF(save_taint);
#ifdef NO_TAINT_SUPPORT
PERL_UNUSED_VAR(save_taint);