I’ve been working lately on trying to translate some political science 
libraries from R to Julia before I give a talk at Stanford about Julia.

While working on the BasicSpace package 
(https://github.com/johnmyleswhite/BasicSpace.jl), which depends upon some 
Fortran code, I get a bunch of memory corruption errors that seem to occur 
without any pattern.

In particular, while executing my runtests.jl file, I get three types of 
outcomes, which seem to occur randomly with something like the following 
frequencies:

* Malloc errors (80%)
* Segfaults (10%)
* Successful execution (10%)

The same Fortran code doesn’t produce memory failures when called from R. I 
don’t see anything obviously wrong in my Julia code, although I’m not very 
confident that I’ve not done something foolish. For example, I’m using 
comprehensions to generate arrays inside of my ccall. Is that not allowed?

If anybody’s interested in looking into my problem, the error messages I get 
look like the following:

Malloc errors:

        julia(556,0x7fff70ade310) malloc: *** error for object 0x7ff73b0e1920: 
incorrect checksum for freed object - object was probably modified after being 
freed.
*** set a breakpoint in malloc_error_break to debug
Abort trap: 6

Segfault errors:

        Segmentation fault: 11

Successful execution:

        Beginning Blackbox Scaling...4 stimuli have been provided.

        Blackbox estimation completed successfully.

 — John

Reply via email to