Skip to content

Commit b6eeef2

Browse files
authored
fix precompile(::MethodInstance) ccall signature (JuliaLang#56595)
Prevents calling this method from triggering undefined behavior in C
1 parent fa880a7 commit b6eeef2

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
@@ -4191,7 +4191,7 @@ end
41914191

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

41964196
"""
41974197
precompile(f, argtypes::Tuple{Vararg{Any}}, m::Method)

0 commit comments

Comments
 (0)