I am trying to develop LSODA.jl and to overcome some malloc issues. In order to achieve this, I took inspiration from Sundials.jl but I cannot solve the test issue in
test1.jl. Basically, calls to lsoda_free give
julia(7820,0x7fffc9d7a3c0) malloc: *** error for object 0x7fec0a0a22d0: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug signal (6): Abort trap: 6 while loading no file, in expression starting on line 0 __pthread_kill at /usr/lib/system/libsystem_kernel.dylib (unknown line) Allocations: 1935656 (Pool: 1934692; Big: 964); GC: 0
I am a bit new to finalizers mechanisms and I would appreciate some input. Also, it might be useful to know that a Julia structure is passed to a C library which will fill in the internals. When freeing this might cause a problem. In Sundials, everything is done on the C side.
Thank you for your help,