Skip to content

Commit 580b2b8

Browse files
vtjnashKristofferC
authored andcommitted
fix precompile(::MethodInstance) ccall signature (#56595)
Prevents calling this method from triggering undefined behavior in C (cherry picked from commit b6eeef2)
1 parent 229f027 commit 580b2b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

base/loading.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4027,7 +4027,7 @@ end
40274027

40284028
# Variants that work for `invoke`d calls for which the signature may not be sufficient
40294029
precompile(mi::Core.MethodInstance, world::UInt=get_world_counter()) =
4030-
(ccall(:jl_compile_method_instance, Cvoid, (Any, Any, UInt), mi, C_NULL, world); return true)
4030+
(ccall(:jl_compile_method_instance, Cvoid, (Any, Ptr{Cvoid}, UInt), mi, C_NULL, world); return true)
40314031

40324032
"""
40334033
precompile(f, argtypes::Tuple{Vararg{Any}}, m::Method)

0 commit comments

Comments
 (0)