[Coin-discuss] Bug Report in PackedVectorBase

Leo Lopes leo at iems.northwestern.edu
Sat Oct 4 13:28:42 EDT 2003


Dear Laszlo,

	I was having trouble compiling the basic COIN library under the newest 
VS .net (I know, I know), and I noticed you were the last to update 
CoinPackedVectorBase and CoinPackedVector. I'd like to point out a 
feature of that code that is causing a problem. It is on lines 164, 182, 
and 200, and the couple of lines following each case. MSVC 2003 
complains about this code even though gcc and the previous MSVC don't, 
and I think at least this time MSVC 2003 is right.

	The problem is the following: when compiling PackedVectorBase, a 
compiler has no way of knowing that PackedVector has a 
setTestForDuplicateIndex method. It doesn't know, at this point, that 
PackedVector is a child of PackedVectorBase. My guess is that the code 
as it is now only works in gcc and the old MSVC because of the mechanism 
that gcc and MSVC use to implement templates.

	I changed PackedVectorBase and PackedVector so that any references to 
PackedVector are removed from its parent, PackedVectorBase. This 
involved moving the binaryOp functions to PackedVector and changing some 
signatures. This allowed the Coin library ato compile cleanly under MSVC 
and gcc and Clp to compile cleanly under gcc. I haven't tried other 
libraries/compilers combinations yet.

	The sources I am sending you are not changes of the absolute newest 
versions in the CVS. However the same holds true of those versions.

Cheers,
Leo.

Laszlo Ladanyi wrote:
> I think I caught all memory problems. At least now valgrind is quiet. It
> wasn't too bad, various pointers got deleted multiple times. I think there are
> memory leaks left. I'll try to deal with them over the weekend or early next
> week.
> 
> All the changes are committed. 
> 
> Thanks for the bug report!
> --Laci
> 
> 
> _______________________________________________
> Coin-discuss mailing list
> Coin-discuss at www-124.ibm.com
> http://www-124.ibm.com/developerworks/oss/mailman/listinfo/coin-discuss

-- 
=======================================================================
Leonardo B. Lopes                                   leo at sie.arizona.edu
Visiting Assistant Professor                              (520)626-1780
SIE - University of Arizona
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CoinPackedVectorBase.hpp
URL: <http://list.coin-or.org/pipermail/coin-discuss/attachments/20031004/18e28bb0/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CoinPackedVector.hpp
URL: <http://list.coin-or.org/pipermail/coin-discuss/attachments/20031004/18e28bb0/attachment-0001.ksh>


More information about the Coin-discuss mailing list