[CoinUtils-tickets] [COIN-OR Common Utilities] #75: integer overflow in CoinArrayWithLength

COIN-OR Common Utilities coin-trac at coin-or.org
Mon Apr 2 15:17:50 EDT 2012


#75: integer overflow in CoinArrayWithLength
-----------------------+----------------
  Reporter:  mlubin    |     Owner:
      Type:  defect    |    Status:  new
  Priority:  critical  |   Version:
Resolution:            |  Keywords:
-----------------------+----------------

Comment (by mlubin):

 Patra,

 You're correct about the two separate issues (and about ptrdiff_t being
 more appropriate than intptr_t). Changing the internal sizes in
 CoinArrayWithLength is a reasonable first step, although by itself it's a
 stopgap measure. Believe it or not I've hit the 16 GB limit in some cases.

 I'm not sure of the performance penalty of operations with 64-bit integers
 on 64-bit machines, but in terms of the overall execution time I would
 expect it to be very small. It seems like the default behavior should be
 the correct behavior that avoids the possibility of crashes (i.e. typedef
 ptrdiff_t CoinBigIndex), leaving the optimization of using a smaller type
 for CoinBigIndex to advanced users.

-- 
Ticket URL: <https://projects.coin-or.org/ticket/75#comment:2>
COIN-OR Common Utilities <http://projects.coin-or.org/CoinUtils>
Common data structures and linear algebra functions for COIN-OR projects



More information about the CoinUtils-tickets mailing list