Skip to content

Commit a96fc50

Browse files
committed
1 parent 8a0e0a4 commit a96fc50

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/validation.jl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,18 @@ function check_ir!(job, errors::Vector{IRError}, inst::LLVM.CallInst)
218218
@safe_debug "Decoding arguments to jl_get_binding_or_error failed" inst bb=LLVM.parent(inst)
219219
push!(errors, (DELAYED_BINDING, bt, nothing))
220220
end
221+
elseif fn == "jl_reresolve_binding_value_seqcst" || fn == "ijl_reresolve_binding_value_seqcst"
222+
try
223+
# pry the binding from the IR
224+
expr = arguments(inst)[1]::ConstantExpr
225+
expr = first(operands(expr))::ConstantInt # get rid of inttoptr
226+
ptr = Ptr{Any}(convert(Int, expr))
227+
obj = Base.unsafe_pointer_to_objref(ptr)
228+
push!(errors, (DELAYED_BINDING, bt, obj.globalref))
229+
catch e
230+
@safe_debug "Decoding arguments to jl_reresolve_binding_value_seqcst failed" inst bb=LLVM.parent(inst)
231+
push!(errors, (DELAYED_BINDING, bt, nothing))
232+
end
221233
elseif fn == "jl_invoke" || fn == "ijl_invoke"
222234
try
223235
f, args, nargs, meth = arguments(inst)

0 commit comments

Comments
 (0)