#12173: Update FLINT to 2.3
-------------------------------+--------------------------------------------
Reporter: mhansen | Owner: tbd
Type: enhancement | Status: new
Priority: major | Milestone: sage-5.1
Component: packages | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers:
Authors: | Merged in:
Dependencies: 12433 | Stopgaps:
-------------------------------+--------------------------------------------
Comment (by jpflori):
I'm not sure how everything gets freed when Sage exits but I think I got
the culprit (or one of them).
When quit_all() in sage.all is called
- in the beginning free_flint_stack() is called which calls
_fmpz_cleanup(),
- but then there must be other calls to fmpz_poly_clear() for example in
..quaternion_algebra_element._clear_globals(),
whence potential double free().
Also the __dealloc__ methods of the classes based on fmp?_poly call
fmp?_clear_poly.
I don't know when Python objects are deallocated but if this happens after
the call to _fmpz_cleanup(), that might be problematic.
As far as PARI is concerned, the __dealloc__ function of gen objects first
checks that the pointer to the PARI object is not 0, maybe the same should
be done for Sage objects based on flint objects.
However, calls to fmpz_poly_clear as in quaternion_algebra_element will be
more tedious to deal with.
After a first experiment, putting the call to free_flint_stack() a little
later, just after twisted is closed solves memory corruption when
doctesting ell_padic_field.
This is quite mysterious to me...
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12173#comment:39>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.