diff --git a/check/fixes.frm b/check/fixes.frm index 08c96d13..57696a68 100644 --- a/check/fixes.frm +++ b/check/fixes.frm @@ -962,6 +962,63 @@ L F7 = f(10000*g5_); #pend_if mpi? assert runtime_error? *--#] Issue94 : +*--#[ Issue95 : +#- +#: filepatches 32 +#: largepatches 32 +#: largesize 6250000 +#: maxtermsize 1250 +#: smallsize 1250000 +#: smallextension 2500032 +#: termsinsmall 12500 + +Off Statistics; + +Symbol x,n; + +* One fewer term than reported in the Issue, since now the +* non-x term is in the initial definition of test. +#define NTERMS "266905" + +Local test = sum_(n,1,`NTERMS',x^n) - `NTERMS'*(`NTERMS'+1)/2; +.sort + +* Check all terms present +Identify x^n?pos_ = n; + +Print; +.end +# This takes a long time for tform under valgrind. +# tform -w4 also doesn't crash here anyway (but -w2 does). +#pend_if valgrind? && threaded? +# Also doesn't run properly for 32bit form. +#require wordsize >= 4 +assert succeeded? +assert result("test") =~ expr("0") +*--#] Issue95 : +*--#[ Issue95b : +#- +#:filepatches 4 +#:largesize 25600 +#:maxtermsize 200 +#:smallsize 12800 +#:termsinsmall 16 + +Off stats; + +#define N "323" +S x,k; +L F = sum_(k,1,`N',x^k); +.sort + +L CheckZero = F - {`N'*(`N'+1)/2}; +id x^k?pos_ = k; + +Print CheckZero; +.end +assert succeeded? +assert result("CheckZero") =~ expr("0") +*--#] Issue95b : *--#[ Issue97_1 : * "Program terminating" with oldFactArg and dot products V e1, e2, k1, k2; diff --git a/sources/sort.c b/sources/sort.c index 17a48df0..a21e479c 100644 --- a/sources/sort.c +++ b/sources/sort.c @@ -1056,8 +1056,8 @@ LONG EndSort(PHEAD WORD *buffer, int par) position = S->fPatches[S->fPatchN]; ss = S->sPointer; if ( *ss ) { -#ifdef WITHZLIB *AR.CompressPointer = 0; +#ifdef WITHZLIB if ( S == AT.S0 && AR.NoCompress == 0 && AR.gzipCompress > 0 ) S->fpcompressed[S->fPatchN] = 1; else @@ -4841,8 +4841,10 @@ void CleanUpSort(int num) M_free(S->inPatches, "CleanUpSort: inPatches"); M_free(S->tree, "CleanUpSort: tree"); M_free(S->used, "CleanUpSort: used"); +#ifdef WITHZLIB M_free(S->fpcompressed, "CleanUpSort: fpcompressed"); M_free(S->fpincompressed, "CleanUpSort: fpincompressed"); +#endif M_free(S->ktoi, "CleanUpSort: ktoi"); M_free(S->lBuffer, "CleanUpSort: lBuffer+sBuffer"); M_free(S->file.PObuffer, "CleanUpSort: PObuffer");