Skip to content

UndefRefError in v1.10 under linux #30

Closed
@pablosanjose

Description

@pablosanjose

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions