Hey,
a great tool for finding any memory access violations is Valgrind, which would have complained about this right away. Also, switch on high warning levels, as compilers may also be able to complain in such case.
On the other hand, keep in mind that multi-dimensional arrays may not represent a linear region or memory (if allocated as arrays of pointers to arrays), in which fast-copy will fail…
Best regards,
Karli
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Valgrind is a great tool, but it wouldn't have helped me here. I already knew there was memory corruption; I just blamed the wrong component.
A quick note about fast_copy(). The arguments to fast_copy() are SCALARTYPE *, where SCALARTYPE is float or double. Is there any reason these aren't const SCALARTYPE *?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The following code causes a SIGSEGV on Linux:
The crash seems to depend on the size. Small matrices are ok (e.g. 1,32), but larger ones cause the SIGSEGV.
I'm using gcc 4.4.1, which I know is a bit dated. Can other users reproduce this?
I'm 0 for 2 today. This is also my bug. It should be
Hey,
a great tool for finding any memory access violations is Valgrind, which would have complained about this right away. Also, switch on high warning levels, as compilers may also be able to complain in such case.
On the other hand, keep in mind that multi-dimensional arrays may not represent a linear region or memory (if allocated as arrays of pointers to arrays), in which fast-copy will fail…
Best regards,
Karli
Valgrind is a great tool, but it wouldn't have helped me here. I already knew there was memory corruption; I just blamed the wrong component.
A quick note about fast_copy(). The arguments to fast_copy() are SCALARTYPE *, where SCALARTYPE is float or double. Is there any reason these aren't const SCALARTYPE *?