[Coin-discuss] Segfault when using CbcModel

Kim Hansen kimhanse at gmail.com
Thu Feb 7 08:14:41 EST 2008


I get a segfault in my program on a few lp problems. I don't know if
it is a bug in our way of using coin or it is a problem in coin.

The code that can reproduce the problem can be found at
http://ange.dk/~kim/segfault-11990.tar.gz

I have run our test program through valgrind and gets a lot of invalid
write, the first one is this, the entire valgrind output is in the
tar.gz as valgrind.log.
It looks like an array is allocated 8 bytes too short, but I have no
idea where too look for the reason for this problem.

==32256== Invalid write of size 1
==32256==    at 0x4026BA8: memcpy (mc_replace_strmem.c:402)
==32256==    by 0x40B7C05: CbcModel::branchAndBound(int) (CbcModel.cpp:1510)
==32256==    by 0x8051B22: CoinSolveCbc5::run() (CoinSolveCbc5.cc:461)
==32256==    by 0x804D01F: main (main.cc:256)
==32256==  Address 0x6598a80 is 0 bytes after a block of size 976 alloc'd
==32256==    at 0x4024F14: operator new[](unsigned) (vg_replace_malloc.c:268)
==32256==    by 0x40A86BC: CbcModel::CbcModel(CbcModel const&, bool)
(CoinHelperFunctions.hpp:156)
==32256==    by 0x8050ED7: CoinSolveCbc5::run() (CoinSolveCbc5.cc:222)
==32256==    by 0x804D01F: main (main.cc:256)

Regards,
-- 
Kim Hansen
Vadgårdsvej 3, 2.tv
2860 Søborg
Fastnet: 3956 2437  --  Mobil: 3091 2437




More information about the Coin-discuss mailing list