[Cbc-tickets] [COIN-OR Branch-and-Cut MIP Solver] #111: Memory leak in Cbc
COIN-OR Branch-and-Cut MIP Solver
coin-trac at coin-or.org
Tue Mar 29 14:10:28 EDT 2011
#111: Memory leak in Cbc
---------------------+------------------------------------------------------
Reporter: Gassmann | Type: defect
Status: new | Priority: major
Version: 2.7 | Keywords:
---------------------+------------------------------------------------------
During our work on the weekend I found a leak in the Cbc solver when
specifying
cbc mpsfile -solve -solve
The input file and valgrind leak report are appended below.
ROWS
N OBJ
L R0000000
L R0000001
L R0000002
L R0000003
COLUMNS
MARK0000 'MARKER' 'INTORG'
x0 OBJ -10.0
x0 R0000000 0.7 R0000001 0.5
x0 R0000002 1.0 R0000003 0.1
x1 OBJ -9.0
x1 R0000000 1.0 R0000001 0.8333
x1 R0000002 0.6667 R0000003 0.25
MARK0000 'MARKER' 'INTEND'
RHS
RHS1 R0000000 630
RHS1 R0000001 600
RHS1 R0000002 708
RHS1 R0000003 135
BOUNDS
ENDATA
==8931== My PID = 8931, parent PID = 6308. Prog and args are:
==8931== ./cbc
==8931== ../../OS/data/mpsFiles/parincInteger.mps
==8931== -solve
==8931== -solve
==8931==
==8931== Invalid read of size 4
==8931== at 0x41E729: CbcMain1(int, char const**, CbcModel&, int
(*)(CbcModel*, int)) (CbcSolver.cpp:4464)
==8931== by 0x432BFC: CbcMain1(int, char const**, CbcModel&)
(CbcSolver.cpp:1093)
==8931== by 0x403D5A: main (CoinSolve.cpp:337)
==8931== Address 0x5d1ad44 is 4 bytes before a block of size 0 alloc'd
==8931== at 0x4C2582C: operator new[](unsigned long)
(vg_replace_malloc.c:274)
==8931== by 0x5EEE66: CglPreProcess::createOriginalIndices() const
(CglPreProcess.cpp:5099)
==8931== by 0x5EF169: CglPreProcess::originalColumns() const
(CglPreProcess.cpp:5069)
==8931== by 0x41B37A: CbcMain1(int, char const**, CbcModel&, int
(*)(CbcModel*, int)) (CbcSolver.cpp:3756)
==8931== by 0x432BFC: CbcMain1(int, char const**, CbcModel&)
(CbcSolver.cpp:1093)
==8931== by 0x403D5A: main (CoinSolve.cpp:337)
==8931==
==8931== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 8 from 1)
==8931== malloc/free: in use at exit: 84 bytes in 2 blocks.
==8931== malloc/free: 8,370 allocs, 8,368 frees, 17,501,489 bytes
allocated.
==8931== For counts of detected errors, rerun with: -v
==8931== searching for pointers to 2 not-freed blocks.
==8931== checked 212,480 bytes.
==8931==
==8931==
==8931== 28 bytes in 1 blocks are definitely lost in loss record 1 of 2
==8931== at 0x4C2582C: operator new[](unsigned long)
(vg_replace_malloc.c:274)
==8931== by 0x4249AE: CbcMain1(int, char const**, CbcModel&, int
(*)(CbcModel*, int)) (CbcSolver.cpp:5655)
==8931== by 0x432BFC: CbcMain1(int, char const**, CbcModel&)
(CbcSolver.cpp:1093)
==8931== by 0x403D5A: main (CoinSolve.cpp:337)
==8931==
==8931==
==8931== 56 bytes in 1 blocks are definitely lost in loss record 2 of 2
==8931== at 0x4C2582C: operator new[](unsigned long)
(vg_replace_malloc.c:274)
==8931== by 0x4249D6: CbcMain1(int, char const**, CbcModel&, int
(*)(CbcModel*, int)) (CbcSolver.cpp:5657)
==8931== by 0x432BFC: CbcMain1(int, char const**, CbcModel&)
(CbcSolver.cpp:1093)
==8931== by 0x403D5A: main (CoinSolve.cpp:337)
==8931==
==8931== LEAK SUMMARY:
==8931== definitely lost: 84 bytes in 2 blocks.
==8931== possibly lost: 0 bytes in 0 blocks.
==8931== still reachable: 0 bytes in 0 blocks.
==8931== suppressed: 0 bytes in 0 blocks.
--
Ticket URL: <https://projects.coin-or.org/Cbc/ticket/111>
COIN-OR Branch-and-Cut MIP Solver <http://projects.coin-or.org/Cbc>
An LP-based branch-and-cut MIP solver.
More information about the Cbc-tickets
mailing list