Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid pointer #76

Closed
timholy opened this issue Feb 26, 2019 · 1 comment
Closed

Invalid pointer #76

timholy opened this issue Feb 26, 2019 · 1 comment

Comments

@timholy
Copy link
Member

timholy commented Feb 26, 2019

This causes X on the arrayops tests.

julia> using JuliaInterpreter

julia> TT = Union{UInt8, Int8}
Union{Int8, UInt8}

julia> a = TT[0x0, 0x1]
2-element Array{Union{Int8, UInt8},1}:
 0x00
 0x01

julia> pa = pointer(a)
Ptr{Union{Int8, UInt8}} @0x00007fbf5c864950

julia> @interpret unsafe_store!(pa, 0x1, 2)
ERROR: pointerset: invalid pointer
Stacktrace:
 [1] maybe_evaluate_builtin(::JuliaStackFrame, ::Expr) at /home/tim/.julia/dev/JuliaInterpreter/src/builtins-julia1.1.jl:121
 [2] #evaluate_call!#9(::typeof(JuliaInterpreter.finish_and_return!), ::Function, ::Array{JuliaStackFrame,1}, ::JuliaStackFrame, ::Expr, ::JuliaInterpreter.JuliaProgramCounter) at /home/tim/.julia/dev/JuliaInterpreter/src/interpret.jl:189
 [3] evaluate_call!(::Array{JuliaStackFrame,1}, ::JuliaStackFrame, ::Expr, ::JuliaInterpreter.JuliaProgramCounter) at /home/tim/.julia/dev/JuliaInterpreter/src/interpret.jl:180
 [4] eval_rhs(::Array{JuliaStackFrame,1}, ::JuliaStackFrame, ::Expr, ::JuliaInterpreter.JuliaProgramCounter) at /home/tim/.julia/dev/JuliaInterpreter/src/interpret.jl:315
 [5] _step_expr!(::Array{JuliaStackFrame,1}, ::JuliaStackFrame, ::Any, ::JuliaInterpreter.JuliaProgramCounter, ::Bool) at /home/tim/.julia/dev/JuliaInterpreter/src/interpret.jl:439
 [6] _step_expr!(::Array{JuliaStackFrame,1}, ::JuliaStackFrame, ::JuliaInterpreter.JuliaProgramCounter, ::Bool) at /home/tim/.julia/dev/JuliaInterpreter/src/interpret.jl:464
 [7] finish!(::Array{JuliaStackFrame,1}, ::JuliaStackFrame, ::JuliaInterpreter.JuliaProgramCounter, ::Bool) at /home/tim/.julia/dev/JuliaInterpreter/src/interpret.jl:507
 [8] finish_and_return!(::Array{JuliaStackFrame,1}, ::JuliaStackFrame, ::JuliaInterpreter.JuliaProgramCounter, ::Bool) at /home/tim/.julia/dev/JuliaInterpreter/src/interpret.jl:526 (repeats 3 times)
 [9] top-level scope at /home/tim/.julia/dev/JuliaInterpreter/src/JuliaInterpreter.jl:1063
@timholy
Copy link
Member Author

timholy commented Feb 26, 2019

JuliaLang/julia#31182

timholy added a commit that referenced this issue Feb 26, 2019
Don't interpret functions that call pointerset (fixed #76)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant