#14059: Fix refcount/deallocation of integers
-----------------------------+----------------------------------------------
Reporter: SimonKing | Owner: rlm
Type: defect | Status: new
Priority: blocker | Milestone: sage-5.7
Component: memleak | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers:
Authors: | Merged in:
Dependencies: | Stopgaps:
-----------------------------+----------------------------------------------
Comment (by SimonKing):
Replying to [comment:17 jpflori]:
> The problem occurs when deallocating ONE, which is allocated before the
hooks are setup, with the hooked method.
OK. But ONE is not the only integer that gets created before setting the
hook.
The created integers are:
* 0
* 1
* ONE (hence, the integer 1 is created, and then another 1 is created and
assigned to ONE)
* -1
* 0
* 1
* `global_dummy_Integer` (which is 0)
And them the hooks are established.
> Creating ONE after hooking up the method (seemingly) solves the problem.
But probably we should take care of the other elements as well.
By the way: There is another way to make the segfault vanish. We could
simply insert print statements, that print the memory addresses of the
integers when they are created/deleted/taken from the pool/put into the
pool. It works (but don't take it as a serious suggestion...)!
So, how did you find out that ONE is deallocated with the hooked method?
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14059#comment:18>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.