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

UndefRefError in v1.10 under linux #30

Open
pablosanjose opened this issue Jan 20, 2024 · 1 comment
Open

UndefRefError in v1.10 under linux #30

pablosanjose opened this issue Jan 20, 2024 · 1 comment

Comments

@pablosanjose
Copy link

pablosanjose commented Jan 20, 2024

This snippets either segfaults or returns an unhandled UndefRefError, but only in Julia 1.10 (starting at least with beta1) and only under linux and macos (though the latter only on intel macs). This issue is not observed in 1.9 or in apple-silicon macs. I didn't check Windows.

using LinearAlgebra, FunctionWrappers
function test()
    function sfunc()
        e = eigen([1.0 + 0im ;;])
        return e
    end
    E = LinearAlgebra.Eigen{Complex{Float64}, Complex{Float64}, Matrix{Complex{Float64}}, Vector{Complex{Float64}}}
    asolver = FunctionWrappers.FunctionWrapper{E,Tuple{}}(sfunc)
    return asolver
end
s = test()
s()
using Symbolics
s()

Symbolics can be changed to Makie or some other largish package. I am not altogether sure this is a FunctionWrappers issue, since the LinearAlgebra.eigen call seems to be necessary.

Intriguingly, the unhandled memory is avoided if we call sfunc() inside test just after defining it.

Ref: pablosanjose/Quantica.jl#235

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