From 580b2b86749b57fc90822679a8772faa7473f3ae Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Mon, 18 Nov 2024 15:17:41 -0500 Subject: [PATCH] fix precompile(::MethodInstance) ccall signature (#56595) Prevents calling this method from triggering undefined behavior in C (cherry picked from commit b6eeef20f33c02425e4e93e51e939e0b4c1397f4) --- base/loading.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/loading.jl b/base/loading.jl index bc7ce64c945aa..9dd5f9661da46 100644 --- a/base/loading.jl +++ b/base/loading.jl @@ -4027,7 +4027,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)