Skip to content

Commit

Permalink
Don't interpret Base.load_state_acquire (#459)
Browse files Browse the repository at this point in the history
This has an llvmcall doing an atomic operation...just avoid the hassle
and call it directly.

Fixes #354
  • Loading branch information
timholy authored Dec 17, 2020
1 parent fb0c899 commit 7fa7e2a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions src/packagedef.jl
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,13 @@ function set_compiled_methods()
end
end

# Does an atomic operation via llvmcall (this fixes #354)
if isdefined(Base, :load_state_acquire)
for m in methods(Base.load_state_acquire)
push!(compiled_methods, m)
end
end

###########
# Modules #
###########
Expand Down
4 changes: 2 additions & 2 deletions test/interpret.jl
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,10 @@ using PyCall
let np = pyimport("numpy")
@test @interpret(PyCall.pystring_query(np.zeros)) === Union{}
end
# Issue #354 (partial fix)
# Issue #354
using HTTP
headers = Dict("User-Agent" => "Debugger.jl")
@test_broken @interpret(HTTP.request("GET", "https://api.github.com/", headers))
@test @interpret(HTTP.request("GET", "https://api.github.com/", headers)) isa HTTP.Messages.Response

# "correct" line numbers
defline = @__LINE__() + 1
Expand Down

0 comments on commit 7fa7e2a

Please sign in to comment.