-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Unreachable reached (illegal instruction) in SimJulia on 1.3 #33370
Comments
cc @c42f in case the renaming of the |
Reduced to: module a
abstract type b{c} end
end
module d
using ..a
export g, @h
mutable struct g fsmi :: a.b
function g(func )
i = new()
i.fsmi = func(env )
execute(i, i)
end
end
macro h(expr)
esc(:(g($(expr.args...))))
end
function execute(f, i)
try
i.fsmi()
catch end
end
end
using .d
struct var"##403" <: a.b{Any}
function var"##403"(e)
new()
end
end
function fibonnaci(e)var"##403"(j)
end
function (::var"##403")()
end
@h fibonnaci() |
Is it possible to learn this power? |
I suspect Tim is doing https://discourse.julialang.org/t/ann-automatic-test-case-reduction/17700 ;) |
Further reduction: abstract type B end
mutable struct G
f :: B
function G(x)
g = new()
g.f = x
g.f()
end
end
n = Symbol("#1") # Needs to start with `#` ??
@eval begin
struct $n <: B
end
function (::$n)()
end
x = $n()
end
G(x) |
Looks like maybe a failure in type inference which is somehow related to internally named types (?) for n in [Symbol("#1"), :X]
@eval module A
abstract type B end
struct $n <: B
end
function (::$n)()
end
x = $n()
mutable struct G
f :: B
function G(x)
g = new()
g.f = x
g.f()
end
end
using InteractiveUtils
println("Code for $(typeof(x))")
show(@code_typed G(x))
println()
end
end Produces:
yet both these should be exactly the same, given they have identical structure (other than the funny name for |
@JeffBezanson, @vtjnash, perhaps one of you could look at this soonish? It's the last thing for 1.3-RC3 (and only known regression with 1.3). |
Bisected to 99d2406 cc @vtjnash This block from that commit looks relevant: Lines 490 to 497 in d036575
|
Use a different mechanism to detect front-end generated temporaries which should be reliable instead of a hack. fix #33370
Use a different mechanism to detect front-end generated temporaries which should be reliable instead of a hack. fix #33370
After some discussion in JuliaDynamics/ConcurrentSim.jl#63 it seems the following is a regression in 1.3. Running (where some of this code has been macroexpanded from ResumableFunctions):
crashes with
Running the code through JuliaInterpreter works fine.
Also, just renaming the variable
var"##403"
to something else, (likeMyTest
) makes the code work:The text was updated successfully, but these errors were encountered: