diff options
author | Sergey Skvortsov <skv@FreeBSD.org> | 2009-01-13 21:38:50 +0000 |
---|---|---|
committer | Sergey Skvortsov <skv@FreeBSD.org> | 2009-01-13 21:38:50 +0000 |
commit | 4ab5fefc98eaa00392de2ce4470acec599b7a6a2 (patch) | |
tree | 5bf114288fee3a5bd15c167bfe721b43460eca45 /lang/perl5.12/files/patch-sv.c | |
parent | - Update to 3.6b (diff) |
Update to 5.8.9
Also:
- add option SITECUSTOMIZE which enable -Dusesitecustomize [1]
- add patch against sv_dup() bug causes memory corruption in threaded perl [2]
Changes: http://search.cpan.org/~nwclark/perl-5.8.9/pod/perl589delta.pod
PR: 111120 [1], 130033 [2]
Submitted by: "Ian A. Tegebo" <yontege xx dev-mug.rescomp.berkeley.edu> [1],
kevin brintnall <kbrint xx rufus.net> [2]
Notes
Notes:
svn path=/head/; revision=225991
Diffstat (limited to 'lang/perl5.12/files/patch-sv.c')
-rw-r--r-- | lang/perl5.12/files/patch-sv.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lang/perl5.12/files/patch-sv.c b/lang/perl5.12/files/patch-sv.c new file mode 100644 index 000000000000..aeb160db81bd --- /dev/null +++ b/lang/perl5.12/files/patch-sv.c @@ -0,0 +1,21 @@ +--- sv.c ++++ sv.c +@@ -9813,7 +9813,8 @@ Perl_sv_dup(pTHX_ SV *sstr, CLONE_PARAMS* param) + IoBOTTOM_NAME(dstr) = SAVEPV(IoBOTTOM_NAME(dstr)); + break; + case SVt_PVAV: +- if (AvARRAY((AV*)sstr)) { ++ /* avoid cloning an empty array */ ++ if (AvARRAY((AV*)sstr) && AvFILLp((AV*)sstr >= 0) { + SV **dst_ary, **src_ary; + SSize_t items = AvFILLp((AV*)sstr) + 1; + +@@ -9838,6 +9839,8 @@ Perl_sv_dup(pTHX_ SV *sstr, CLONE_PARAMS* param) + else { + SvPV_set(dstr, NULL); + AvALLOC((AV*)dstr) = (SV**)NULL; ++ AvMAX( (AV *)dstr) = -1; ++ AvFILLp((AV *)dstr) = -1; + } + AvARYLEN((AV*)dstr) = sv_dup_inc(AvARYLEN((AV*)sstr), param); + break; |