Opened 11 years ago

Closed 10 years ago

#27 closed defect (worksforme)

Bug in ClpPackedMatrix::transposeTimes

Reported by: tlawry Owned by: somebody
Priority: major Milestone:
Component: component1 Version:
Keywords: Cc:

Description

The starting points of each column are stored in columnStart and the lengths (the amount actually used to store the column) is stored in columnLength. If you want to iterate over the elements in the column, then you need to use the value in columnLength, e.g. to iterate over the elements in column i for (j = columnStart[i]; j < columnStart[i] + columnLength[i]; j++)

However, in the original code, the upper bound on the loop was instead set to columnStart[i+1] for (j = columnStart[i]; j < columnStart[i+1]; j++)

This was causing an access violation in one of our jobs. I've fixed this in all the places it occurs in the transposeTimes function (4 places - someone else had already fixed the fifth place!).

Attachments (1)

Update.txt (4.8 KB) - added by tlawry 11 years ago.
Code Fix

Download all attachments as: .zip

Change History (2)

Changed 11 years ago by tlawry

Code Fix

comment:1 Changed 10 years ago by forrest

  • Resolution set to worksforme
  • Status changed from new to closed

I need an example showing problem. Your fix to code is not correct. flags_&2 should only be nonzero if there are no gaps.

Note: See TracTickets for help on using tickets.