Skip to content

Commit 7fa7e2a

Browse files
authored
Don't interpret Base.load_state_acquire (#459)
This has an llvmcall doing an atomic operation...just avoid the hassle and call it directly. Fixes #354
1 parent fb0c899 commit 7fa7e2a

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/packagedef.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,13 @@ function set_compiled_methods()
9999
end
100100
end
101101

102+
# Does an atomic operation via llvmcall (this fixes #354)
103+
if isdefined(Base, :load_state_acquire)
104+
for m in methods(Base.load_state_acquire)
105+
push!(compiled_methods, m)
106+
end
107+
end
108+
102109
###########
103110
# Modules #
104111
###########

test/interpret.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,10 +229,10 @@ using PyCall
229229
let np = pyimport("numpy")
230230
@test @interpret(PyCall.pystring_query(np.zeros)) === Union{}
231231
end
232-
# Issue #354 (partial fix)
232+
# Issue #354
233233
using HTTP
234234
headers = Dict("User-Agent" => "Debugger.jl")
235-
@test_broken @interpret(HTTP.request("GET", "https://api.github.com/", headers))
235+
@test @interpret(HTTP.request("GET", "https://api.github.com/", headers)) isa HTTP.Messages.Response
236236

237237
# "correct" line numbers
238238
defline = @__LINE__() + 1

0 commit comments

Comments
 (0)