/[pkgs]/devel/perl/28_fix_inplace_sort
ViewVC logotype

Contents of /devel/perl/28_fix_inplace_sort

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Wed Mar 11 22:01:05 2009 UTC (8 months, 1 week ago) by spot
Branch: MAIN
CVS Tags: F-12-split, perl-5_10_0-63_fc11, perl-5_10_0-61_fc11, perl-5_10_0-80_fc12, perl-5_10_0-81_fc12, perl-5_10_0-84_fc13, perl-5_10_0-82_fc13, perl-5_10_0-77_fc12, perl-5_10_0-83_fc13, perl-5_10_0-71_fc12, perl-5_10_0-75_fc12, perl-5_10_0-73_fc12, perl-5_10_0-68_fc11, perl-5_10_0-67_fc11, perl-5_10_0-64_fc11, perl-5_10_0-72_fc12, F-11-split, perl-5_10_0-62_fc11, perl-5_10_0-69_fc12, perl-5_10_0-79_fc12, perl-5_10_0-78_fc12, perl-5_10_0-70_fc12, perl-5_10_0-74_fc12, perl-5_10_0-66_fc11, perl-5_10_0-65_fc11, perl-5_10_0-76_fc12, HEAD
reorder @INC, fix bz 489204, merge useful debian patches
1 Fix memory corruption with in-place sorting. (Closes: #498769)
2
3 [perl #54758]
4
5 Fixed in bleadperl by change 33937.
6 diff --git a/pp_sort.c b/pp_sort.c
7 index 582b811..1d38bc3 100644
8 --- a/pp_sort.c
9 +++ b/pp_sort.c
10 @@ -1553,11 +1553,12 @@ PP(pp_sort)
11 max = AvFILL(av) + 1;
12 if (SvMAGICAL(av)) {
13 MEXTEND(SP, max);
14 - p2 = SP;
15 for (i=0; i < max; i++) {
16 SV **svp = av_fetch(av, i, FALSE);
17 *SP++ = (svp) ? *svp : NULL;
18 }
19 + SP--;
20 + p1 = p2 = SP - (max-1);
21 }
22 else {
23 if (SvREADONLY(av))
24 @@ -1713,7 +1714,7 @@ PP(pp_sort)
25 SvREADONLY_off(av);
26 else if (av && !sorting_av) {
27 /* simulate pp_aassign of tied AV */
28 - SV** const base = ORIGMARK+1;
29 + SV** const base = MARK+1;
30 for (i=0; i < max; i++) {
31 base[i] = newSVsv(base[i]);
32 }

admin@fedoraproject.org
ViewVC Help
Powered by ViewVC 1.1.2