Skip to content

Commit

Permalink
fix precompile(::MethodInstance) ccall signature (#56595)
Browse files Browse the repository at this point in the history
Prevents calling this method from triggering undefined behavior in C
  • Loading branch information
vtjnash authored Nov 18, 2024
1 parent fa880a7 commit b6eeef2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/loading.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4191,7 +4191,7 @@ end

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

"""
precompile(f, argtypes::Tuple{Vararg{Any}}, m::Method)
Expand Down

0 comments on commit b6eeef2

Please sign in to comment.