#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: Reported upstream. Developers acknowledge bug. |
Reviewers:
Authors: | Merged
in:
Dependencies: |
Stopgaps:
------------------------------------------------------------------+---------
Comment (by nbruin):
Replying to [comment:36 SimonKing]:
> Hence: Could you create diff files for your fixes in the Singular source
code (I am not talking about the malloc thing but about the bug fixes), so
that one can put them into the `patches/` directory of the Singular spkg?
For the bug that tripped `MALLOC_CHECK_`: sure. That's just a 2-line
change which I'm fairly confident is safe to make.
{{{#!diff
- int *F=(int *)omAlloc0((rN+1)*sizeof(int));
+ int *F=(int *)omAlloc0(ExpSize);
- int *G=(int *)omAlloc0((rN+1)*sizeof(int));
+ int *G=(int *)omAlloc0(ExpSize);
}}}
For the second bug: I have no idea how to fix that. Just doing
{{{#!diff
- int *order = (int *) omAlloc(2* sizeof(int))
+ int *order = (int *) omAlloc(3* sizeof(int))
}}}
may work but is a bit questionable.
Also I have no experience in making patch files for the singular source.
It may be a bit more robust to take whatever change Singular makes to
their development version and backport that.
Also: we're not done yet. There's still a branch on what valgrind thinks
is an uninitialized value and there's the `List<CanonicalForm>::isEmpty()`
issue which ventures into templated code, so I'm at a loss for that.
Purpose of this ticket: I guess it's vague. Feel free to specify. I was
actually hoping that after seeing that singular-malloc can expose issues
that are otherwise hard to find, Singular might be interesting in adopting
it and including it as a honest configure option (resolving the problem
with the executable too). Then we can just put the proper doc in the spkg.
If they don't do that, we could still do so but as a patch to singular.
My goal was just to get rid of Heisenbugs in our communication with
Singular.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13731#comment:37>
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.