Skip to content

Commit 6eaf051

Browse files
authored
Merge pull request #77 from JuliaDebug/teh/pointerset
Don't interpret functions that call pointerset (fixed #76)
2 parents ed847f4 + 527a46a commit 6eaf051

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/JuliaInterpreter.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,6 +1074,9 @@ function set_compiled_methods()
10741074
if Sys.iswindows()
10751075
push!(compiled_methods, which(InteractiveUtils.clipboard, (AbstractString,)))
10761076
end
1077+
# issue #76
1078+
push!(compiled_methods, which(unsafe_store!, (Ptr{Any}, Any, Int)))
1079+
push!(compiled_methods, which(unsafe_store!, (Ptr, Any, Int)))
10771080
end
10781081

10791082
function __init__()

test/interpret.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,3 +263,10 @@ let A = [1]
263263
@interpret setindex!(wkd, 2, A)
264264
@test wkd[A] == 2
265265
end
266+
267+
# issue #76
268+
let TT = Union{UInt8, Int8}
269+
a = TT[0x0, 0x1]
270+
pa = pointer(a)
271+
@interpret unsafe_store!(pa, 0x1, 2)
272+
end

0 commit comments

Comments
 (0)