Skip to content

Commit

Permalink
Avoid GC problem in Cyclotomic
Browse files Browse the repository at this point in the history
DIFF can cause a GC, which might move ResultCyc
  • Loading branch information
ChrisJefferson authored and fingolfin committed Mar 28, 2018
1 parent b9b24ad commit ad6d758
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/cyclotom.c
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,9 @@ Obj Cyclotomic (
res[0] = cof;
else {
CHANGED_BAG( ResultCyc );
res[0] = DIFF( INTOBJ_INT(0), cof );
Obj negcof = DIFF( INTOBJ_INT(0), cof );
res = BASE_PTR_PLIST(ResultCyc);
res[0] = negcof;
}
n = 1;
}
Expand Down

0 comments on commit ad6d758

Please sign in to comment.