-
-
Couldn't load subscription status.
- Fork 5.7k
Open
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviortypes and dispatchTypes, subtyping and method dispatchTypes, subtyping and method dispatch
Description
Found while working on #27736:
julia> # removing the `S` here fixes the segfault
function g(x::T) where {T,S}
cf = @cfunction identity Ref{T} (Ref{T},)
GC.@preserve cf begin
fptr = Base.unsafe_convert(Ptr{Cvoid}, cf)
ccall(fptr, Ref{T}, (Ref{T},), x)
end
end
g (generic function with 1 method)
julia> g(1)
[1] 35506 segmentation fault juliajulia> versioninfo()
Julia Version 0.7.0-beta.9
Commit d7bf89fc1c (2018-06-25 13:53 UTC)
Platform Info:
OS: macOS (x86_64-apple-darwin17.5.0)
CPU: Intel(R) Core(TM) i7-7920HQ CPU @ 3.10GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.0 (ORCJIT, skylake)pablosanjose
Metadata
Metadata
Assignees
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviortypes and dispatchTypes, subtyping and method dispatchTypes, subtyping and method dispatch