Bug #351
Problems with DenseMatImpl::myResize
Status:
Closed
Priority:
Normal
Assignee:
Category:
Safety
Target version:
Description
When calling
void DenseMatImpl::myResize(long NumRows, long NumCols)
for removing a row/colum the program runs OK, but on exit gives "IMMINENT DISASTER".
Maybe something is not freed properly? Code looks very reasonable.
Needs proper investigation with valgrind, memleaks tools,..
Related issues
History
#1 Updated by Anna Maria Bigatti almost 11 years ago
- Status changed from New to Resolved
- Assignee set to Anna Maria Bigatti
- % Done changed from 0 to 90
fixed really subtle bug in myResize()
myEntries[i].resize(NumCols, myR->myNew()); // second arg not used
second argument is not used, but myNew is called (and created a dangling element).
So now we actually create a useless RingElem, and pass
raw(useless)
instead.
Not so horrible to find thanks to our wonderful memory debugger ;-)
[ERR] MemPoolDebug("RingDistrMPolyCleanImpl::myDMPPool") ERROR: dtor, unfreed slices: NumSlices=3 ERROR!!! RingQQ refcount = 4 but should be 1.
#2 Updated by Anna Maria Bigatti over 10 years ago
- Target version changed from CoCoALib-0.99534 Seoul14 to CoCoALib-0.99532
#3 Updated by Anna Maria Bigatti about 10 years ago
- Target version changed from CoCoALib-0.99532 to CoCoALib-0.99533 Easter14
#4 Updated by John Abbott about 10 years ago
I guess you could use raw(zero(myR))
instead of raw(useless)
; though perhaps the latter is clearer?
#5 Updated by Anna Maria Bigatti about 10 years ago
- Status changed from Resolved to Closed
- % Done changed from 90 to 100
- Estimated time set to 3.00 h
tested, added test-matrix4 (which indeed gave IMMINENT DISASTER before recompiling ;-)