#13731: Fix libsingular memory management
--------------------------------------------------------------+-------------
Reporter: nbruin | Owner:
rlm
Type: defect | Status:
new
Priority: major | Milestone:
sage-5.6
Component: memleak | Resolution:
Keywords: | Work issues:
Report Upstream: Fixed upstream, in a later stable release. | Reviewers:
Authors: Nils Bruin, Simon King | Merged in:
Dependencies: | Stopgaps:
--------------------------------------------------------------+-------------
Comment (by nbruin):
Indeed, `kernel/pp_Mult_mm__T.cc:32`:
{{{
omBin bin = ri->PolyBin;
DECLARE_LENGTH(const unsigned long length = ri->ExpL_Size);
const unsigned long* m_e = m->exp;
pAssume(!n_IsZero(ln,ri));
pAssume1(p_GetComp(m, ri) == 0 || p_MaxComp(p, ri) == 0);
number tmp;
do
{
tmp = n_Mult(ln, pGetCoeff(p), ri);
#ifdef HAVE_ZERODIVISORS
if (! n_IsZero(tmp, ri))
{
#endif
p_AllocBin( pNext(q), bin, ri);
q = pNext(q);
pSetCoeff0(q, tmp);
}}}
I haven't looked into what happens here exactly, but `r->PolyBin` does get
passed around. It might not be deref problem, though, but:
`omalloc/omalloc.h:142` (xalloc really)
{{{
#define omTypeAllocBin(T,P,B) P=(T)omAlloc(sizeof(B))
#define omTypeAlloc(T,P,S) P=(T)omAlloc(S)
#define omTypeAlloc0Bin(T,P,B) P=(T)omAlloc0(B)
}}}
looks suspicious to me. The two allocbin routines look incompatible to me.
I think they are supposed to have the same interface type.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13731#comment:92>
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.