Skip to content

Commit

Permalink
Merge pull request #77 from JuliaDebug/teh/pointerset
Browse files Browse the repository at this point in the history
Don't interpret functions that call pointerset (fixed #76)
  • Loading branch information
timholy authored Feb 26, 2019
2 parents ed847f4 + 527a46a commit 6eaf051
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/JuliaInterpreter.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1074,6 +1074,9 @@ function set_compiled_methods()
if Sys.iswindows()
push!(compiled_methods, which(InteractiveUtils.clipboard, (AbstractString,)))
end
# issue #76
push!(compiled_methods, which(unsafe_store!, (Ptr{Any}, Any, Int)))
push!(compiled_methods, which(unsafe_store!, (Ptr, Any, Int)))
end

function __init__()
Expand Down
7 changes: 7 additions & 0 deletions test/interpret.jl
Original file line number Diff line number Diff line change
Expand Up @@ -263,3 +263,10 @@ let A = [1]
@interpret setindex!(wkd, 2, A)
@test wkd[A] == 2
end

# issue #76
let TT = Union{UInt8, Int8}
a = TT[0x0, 0x1]
pa = pointer(a)
@interpret unsafe_store!(pa, 0x1, 2)
end

0 comments on commit 6eaf051

Please sign in to comment.