diff options
author | Nicholas Clark <nick@ccl4.org> | 2006-01-26 14:57:42 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2006-01-26 14:57:42 +0000 |
commit | d8b2590f979b3ba5689a5135513b1feda3473a5e (patch) | |
tree | 71b643d3e764f734898f443df9edddb7f2071dc7 /mg.c | |
parent | 5b047c536d1d4af9afcf38bdde386f229beb9493 (diff) | |
download | perl-d8b2590f979b3ba5689a5135513b1feda3473a5e.tar.gz |
SvREADONLY_off inside the magic routines is also dangerous on shared
hash key scalars, so decompose them to normal scalars if they ever
get here.
p4raw-id: //depot/perl@26946
Diffstat (limited to 'mg.c')
-rw-r--r-- | mg.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -86,11 +86,10 @@ S_save_magic(pTHX_ I32 mgs_ix, SV *sv) dVAR; MGS* mgs; assert(SvMAGICAL(sv)); -#ifdef PERL_OLD_COPY_ON_WRITE - /* Turning READONLY off for a copy-on-write scalar is a bad idea. */ + /* Turning READONLY off for a copy-on-write scalar (including shared + hash keys) is a bad idea. */ if (SvIsCOW(sv)) sv_force_normal_flags(sv, 0); -#endif SAVEDESTRUCTOR_X(S_restore_magic, INT2PTR(void*, (IV)mgs_ix)); |