Closed KristofferC closed 9 years ago
I tried this test script on my machine:
x = rand(10^6,1);
for k = 1:1000000
Jl.call('sin',x);
end
and wasn't able to generate a failure on my windows machine.
This julia-users thread is probably relevant: https://groups.google.com/forum/#!searchin/julia-users/matlab$20mex/julia-users/yV4rsNokZH4/5yvrflqivdcJ
In that thread, @JeffBezanson says:
This line will do it:
jl_options.handle_signals = JL_OPTIONS_HANDLE_SIGNALS_OFF;
jl_options is DLLEXPORTed, and both it and its type are in julia.h.
The OP says it worked for them, so I will add this to the init block in jlcall.cpp
.
@KristofferC: do a pull, delete the old jlcall
mex function, and give this patch a try.
I didn't try this before the pull, but for reference I don't see any segfault executing the sin
many times, on ubuntu.
OK, I'll close this. Please request to reopen it if you see it again.
I will test again tomorrow when I get back to my work computer where I had the segfaults.
No segfaults here anymore. Great!
Running
x = rand(10^6,1)
and repeatedly callingJl.call(sin, x)
segfaults after a while. This is with MATLAB 8.5 and julia 4.0 rc4 on Ubuntu.