Skip to content

jl_restore_package_image_from_stream can still return an ErrorException #59319

@vchuravy

Description

@vchuravy

@gbaraldi and I just ran into:

ERROR: TypeError: in _svec_ref, expected Core.SimpleVector, got a value of type ErrorException
Stacktrace:
  [1] getindex
    @ ./essentials.jl:935 [inlined]
  [2] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{Any}; register::Bool)
    @ Base ./loading.jl:1281
  [3] _include_from_serialized
    @ ./loading.jl:1246 [inlined]
  [4] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128, stalecheck::Bool; reasons::Dict{String, Int64}, DEPOT_PATH::Vector{String})
    @ Base ./loading.jl:2083
  [5] __require_prelocked(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:2595
  [6] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:2461
  [7] macro expansion
    @ ./loading.jl:2389 [inlined]
  [8] macro expansion
    @ ./lock.jl:376 [inlined]
  [9] __require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2354
 [10] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2330
 [11] top-level scope
    @ REPL[1]:1

on 1.12-rc1 this is due to #56499, we suspect because there are still codepaths like:

julia/src/staticdata.c

Lines 4381 to 4384 in 6134d9a

jl_value_t *verify_fail = jl_validate_cache_file(f, depmods, &checksum, &dataendpos, &datastartpos);
if (verify_fail)
return verify_fail;

That return the exception directly instead of a SimpleVector.

Metadata

Metadata

Assignees

Labels

regressionRegression in behavior compared to a previous version

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions