#14059: Fix refcount/deallocation of integers
------------------------------+---------------------------------------------
Reporter: SimonKing | Owner: rlm
Type: defect | Status: positive_review
Priority: blocker | Milestone: sage-5.7
Component: memleak | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers: Jean-Pierre Flori
Authors: Simon King | Merged in:
Dependencies: | Stopgaps:
------------------------------+---------------------------------------------
Comment (by jpflori):
Replying to [comment:51 SimonKing]:
> One question: Why is it a problem that ONE was created via `__cinit__`
but deleted via `fast_tp_dealloc`? After all, if the pool is not involved,
this function does the same as `__dealloc__` plus decref. Isn't that the
same as without the hooks?
That's quite exactly what I've been ranting about and hoped we could
better understand although the problem is not at this level but deeper it
seems.
A first guess is that somehow the deep PyObject_Malloc function used
before the hooks are setup is not the debug version and do not produce the
FORBIDDENBYTE markers (and additional info including the size alloced) and
the PyObject_Free function is not as well and does not expect them and
everything is fine if we try to deallocate ONE (you can put an explicit
del statement and check there is not crash, or completely remove the hooks
setup).
But when the hooks are setup, these two functions get replaced by the
Malloc and Free debug functions which set and expect the FORBIDDENBYTE
markers (and some additional info).
So at dealloc time it bangs.
What I don't understand is why these two last debug version would not used
from the start.
After all were living in a debug build of Python...
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14059#comment:52>
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.