Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#70 SegV when calling imat::set_size

release_3.7.x
closed
nobody
None
5
2012-09-15
2004-04-21
mhuffman
No

On a Pentium 4 running Linux RH 9 with gcc 3.3.3, ITPP
3.7.3
I have a struct which contains four itpp imat's. I
set_size and populate the second matrix. I then try to
set_size the first matrix but get a Seg V.
I tried a workaround: changing the data structure from
a struct to an ITPP array. So, I had an array of four
imat's. Same problem occurs-- after I set_size and
populate the second matrix, an attempt to expand the
size of the first matrix by calling set_size causes a
segmentation violation.

Discussion

  • mhuffman
    mhuffman
    2004-04-21

    Logged In: YES
    user_id=989948

    The line of code that causes the segv is the attempted 'new'
    on line 379 of mat.h

     
  • Logged In: YES
    user_id=326034

    I am not sure I understand your bug-report. It would be good
    if you could submit a small program that reproduces the bug.

    /Tony

     
  • mhuffman
    mhuffman
    2004-04-22

    Logged In: YES
    user_id=989948

    Cancel this bug report, all is well...
    Problem was that before set_size was called, I called
    set_submatrix with row and column arguments that were
    1-based instead of 0-based. The set_submatrix call did not
    report an error, but subsequent calls that modified memory
    (e.g., set_size) did.