-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid GC problem in Cyclotomic #2313
Conversation
@@ -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 ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am happy to merge this, though you might want to change this to Obj negcof = AInvInt(cof);
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No I can't, because cof can be a rational :) (seperate note, some int related functions could produce more helpful errors when given non integres)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, sorry for the red herring
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Actually, I have a déjà-vu ... didn't we discuss the exact same thing at the same spot before?)
f9c947a
to
e56c620
Compare
DIFF can cause a GC, which might move ResultCyc
e56c620
to
702bc0d
Compare
Codecov Report
@@ Coverage Diff @@
## master #2313 +/- ##
==========================================
- Coverage 72.33% 72.31% -0.03%
==========================================
Files 479 479
Lines 250960 251946 +986
==========================================
+ Hits 181538 182185 +647
- Misses 69422 69761 +339
|
Backported to stable-4.9 as 01b3b13 |
DIFF can cause a GC, which might move ResultCyc
Found using 'memory canary'.
This should also be cherry-picked onto 4.9.