-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
reproducible segfault inside cfunction(...) #19805
Labels
bug
Indicates an unexpected problem or unintended behavior
Comments
Looks like something isn't restoring the builder context correctly |
Now: julia> type callinfos{FUNC_FT<:Function}
f :: FUNC_FT
end
julia> evalf_callback{FUNC_FT}(ci::callinfos{FUNC_FT}) = ci.f(0.5)::Float64
evalf_callback (generic function with 1 method)
julia> evalf_callback_c{FUNC_FT}(ci::callinfos{FUNC_FT}) = cfunction(
evalf_callback, Float64, (callinfos{FUNC_FT},))
evalf_callback_c (generic function with 1 method)
julia> evalf_callback_c( callinfos(sin) )
ERROR: ccall: the type of argument 1 doesn't correspond to a C type
Stacktrace:
[1] evalf_callback_c(::callinfos{Base.#sin}) at ./REPL[6]:1 |
"Now" means Julia v0.6 and v0.7 (= trunk). So for this versions the above message is the right error message to show. So fixed since v0.6. |
KristofferC
added a commit
that referenced
this issue
May 26, 2017
ararslan
pushed a commit
that referenced
this issue
May 28, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm trying to understand some ideas (which I was shown in JuliaMath/Cubature.jl#23) concerning elimination of dynamic dispatch. With the following code (which may be weird and silly; sorry I'm still learning) I always get a segfault simply by calling
cfunction
(even before trying to use the output pointer):Here is the output:
The text was updated successfully, but these errors were encountered: