Hi,

2014-12-04 18:27 GMT+01:00 Matthias Sitte:
> Hi,
>
> I've got mixed results on different platforms when using more than one
> submatrix simultaneously.

you create the gsl_matrix_view objects view1 and view2 as temporary
objects on the stack, inside nested {...} blocks in main(). In
particular, you create view2 after view1 went out of scope already.
One the machine where both pointers are equal, the memory that was
occupied by view1 is apparently being recycled for view2, which is not
really surprising.

Never use a pointer to an object on the stack after that object went
out of scope! The behavior of your program is undefined if you do.

Cheers,
Frank

Reply via email to