Skip to content

Commit 3b8a100

Browse files
vtjnashKristofferC
authored andcommitted
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 (cherry picked from commit a5abb6f)
1 parent 54ccaad commit 3b8a100

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

base/loading.jl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1267,17 +1267,21 @@ function _include_from_serialized(pkg::PkgId, path::String, ocachepath::Union{No
12671267
sv = try
12681268
if ocachepath !== nothing
12691269
@debug "Loading object cache file $ocachepath for $(repr("text/plain", pkg))"
1270-
ccall(:jl_restore_package_image_from_file, Ref{SimpleVector}, (Cstring, Any, Cint, Cstring, Cint),
1270+
ccall(:jl_restore_package_image_from_file, Any, (Cstring, Any, Cint, Cstring, Cint),
12711271
ocachepath, depmods, #=completeinfo=#false, pkg.name, ignore_native)
12721272
else
12731273
@debug "Loading cache file $path for $(repr("text/plain", pkg))"
1274-
ccall(:jl_restore_incremental, Ref{SimpleVector}, (Cstring, Any, Cint, Cstring),
1274+
ccall(:jl_restore_incremental, Any, (Cstring, Any, Cint, Cstring),
12751275
path, depmods, #=completeinfo=#false, pkg.name)
12761276
end
12771277
finally
12781278
lock(require_lock)
12791279
end
1280+
if isa(sv, Exception)
1281+
return sv
1282+
end
12801283

1284+
sv = sv::SimpleVector
12811285
edges = sv[3]::Vector{Any}
12821286
ext_edges = sv[4]::Union{Nothing,Vector{Any}}
12831287
extext_methods = sv[5]::Vector{Any}

0 commit comments

Comments
 (0)