Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions check/fixes.frm
Original file line number Diff line number Diff line change
Expand Up @@ -5165,6 +5165,17 @@ assert result("test4") =~ expr("16384*f(4)^4")
assert result("htest4") =~ expr("16*g(4)^8")
assert result("ihtest4") =~ expr("4096*h(4)^12")
*--#] Issue856 :
*--#[ Issue873 :
#-
#define POWER "1000"
Symbol x,n;
Local test = 5*fac_(`POWER') - 5*x^`POWER';
Repeat Identify x^n?pos_ = n*x^(n-1);
Print +s;
.end
assert succeeded?
assert result("test") =~ expr("0")
*--#] Issue873 :
*--#[ Issue882_1 :
Off statistics;
Symbol x;
Expand Down
8 changes: 7 additions & 1 deletion sources/proces.c
Original file line number Diff line number Diff line change
Expand Up @@ -4015,7 +4015,13 @@ SkipCount: level++;
*/
}
} while ( ( i = TestMatch(BHEAD term,&level) ) == 0 );
if ( AT.WorkPointer < term + *term ) AT.WorkPointer = term + *term;
// Reset the WorkPointer unconditionally, to avoid consuming a large amount of
// WorkSpace unnecessarily. This implies that at this point, there is no live data
// beyond term + *term. If a bug ever bisects to this commit, we have to document
// very carefully what the data lifetimes are. For example, we can probably not
// reset this following the call to TestSub below: it sets AT.TMaddr and AN.Frozen
// which point into the workspace.
AT.WorkPointer = term + *term;
if ( i > 0 ) replac = TestSub(BHEAD term,level);
else replac = i;
if ( replac >= 0 || AT.TMout[1] != SYMMETRIZE ) {
Expand Down
Loading