jdpicka
09-16-2005, 03:20 PM
I am getting segmentation faults when using various combinations of the commands
dmatrix/free_dmatrix
dvector/free_dvector
ivector/free_ivector
The C program (running in RedHat 9) will execute properly but the segfaults when it it gets part of the way through the free-ing routines at the end. It will typically run several free-ing routines successfully before stopping part way through the list at what gdb identifies as:
Program received signal SIGSEGV, Segmentation fault.
0x420748e0 in _int_free () from /lib/tls/libc.so.6
Googling suggests that this can be caused by trying to free something twice, but that isn't happening in any obvious way. What is odd is the way that it will execute the free-ing routine on one vector, then fail on another of exactly the same type and size.
The program that crashes is attached. It crashes on my machine after free-ing rj.
dmatrix/free_dmatrix
dvector/free_dvector
ivector/free_ivector
The C program (running in RedHat 9) will execute properly but the segfaults when it it gets part of the way through the free-ing routines at the end. It will typically run several free-ing routines successfully before stopping part way through the list at what gdb identifies as:
Program received signal SIGSEGV, Segmentation fault.
0x420748e0 in _int_free () from /lib/tls/libc.so.6
Googling suggests that this can be caused by trying to free something twice, but that isn't happening in any obvious way. What is odd is the way that it will execute the free-ing routine on one vector, then fail on another of exactly the same type and size.
The program that crashes is attached. It crashes on my machine after free-ing rj.