Skip to content

Commit a5abb6f

Browse files
authored
loading: fix ccall signature in _include_from_serialized (#57776)
This still sort of errored correctly anyways (after breakage added from PR #56499), but that behavior should not be relied upon optimizations not breaking it when this is providing incorrect info to the compiler. Fix #57459
1 parent 17f99bc commit a5abb6f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

base/loading.jl

+6-2
Original file line numberDiff line numberDiff line change
@@ -1280,17 +1280,21 @@ function _include_from_serialized(pkg::PkgId, path::String, ocachepath::Union{No
12801280
sv = try
12811281
if ocachepath !== nothing
12821282
@debug "Loading object cache file $ocachepath for $(repr("text/plain", pkg))"
1283-
ccall(:jl_restore_package_image_from_file, Ref{SimpleVector}, (Cstring, Any, Cint, Cstring, Cint),
1283+
ccall(:jl_restore_package_image_from_file, Any, (Cstring, Any, Cint, Cstring, Cint),
12841284
ocachepath, depmods, #=completeinfo=#false, pkg.name, ignore_native)
12851285
else
12861286
@debug "Loading cache file $path for $(repr("text/plain", pkg))"
1287-
ccall(:jl_restore_incremental, Ref{SimpleVector}, (Cstring, Any, Cint, Cstring),
1287+
ccall(:jl_restore_incremental, Any, (Cstring, Any, Cint, Cstring),
12881288
path, depmods, #=completeinfo=#false, pkg.name)
12891289
end
12901290
finally
12911291
lock(require_lock)
12921292
end
1293+
if isa(sv, Exception)
1294+
return sv
1295+
end
12931296

1297+
sv = sv::SimpleVector
12941298
edges = sv[3]::Vector{Any}
12951299
ext_edges = sv[4]::Union{Nothing,Vector{Any}}
12961300
extext_methods = sv[5]::Vector{Any}

0 commit comments

Comments
 (0)