#17320: Memory leaks with LP Solvers are back
-------------------------------------+-------------------------------------
Reporter: pmueller | Owner:
Type: defect | Status: needs_review
Priority: major | Milestone: sage-6.4
Component: linear | Resolution:
programming | Merged in:
Keywords: | Reviewers:
Authors: | Work issues:
Report Upstream: N/A | Commit:
Branch: public/17320 | 5480f4e85c1a0ff96bd1502c78992073ccb854e5
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by nbruin):
Replying to [comment:15 ncohen]:
> Please move that line higher if you care. I believe that you are being
worried unnecessarily.
OK, done. If it's possible the obviously avoid memory leaks at virtually
no cost then we should, particularly because sage library code often is
used as template for new contributions.
Also, ensured that CoinBackend.solve has a return statement: In C, falling
out of a function with a defined return type without executing an explicit
return causes undefined behaviour, which could include returning -1 by
accident (the one value that indicates erroneous behaviour). It seems
cython does set the return value to 0 in absence of a return statement,
but I wasn't able to find that stated explicitly in cython's
documentation. Being explicit about it is safer. (certainly, if you say in
the function signature that returning -1 means an exception has occurred,
then it is instructive to explicitly *not* do that when no exception has
occurred)
--
Ticket URL: <http://trac.sagemath.org/ticket/17320#comment:19>
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.
For more options, visit https://groups.google.com/d/optout.