Skip to content

Circular using and export causes binding partition walker to get stuck #57699

@KristofferC

Description

@KristofferC

Defining a "circular" export and using in the following manner hang

module P
module M
    using ..P
    export A
end

using .M
export A

end

Some profiling shows:

    38.65%  julia    sys.so                       [.] julia_intersect_80077
    33.72%  julia    sys.so                       [.] julia_walk_binding_partition_117381
    23.16%  julia    libjulia-internal.so.1.12.0  [.] jl_get_binding_partition
     2.41%  julia    libjulia-internal.so.1.12.0  [.] jl_bpart_get_restriction_value
     1.79%  julia    libjulia-internal.so.1.12.0  [.] jl_bpart_get_kind

so I guess the binding partition walker keeps walking in circles.

This happens for ObjectFile.jl in the wild for example.

Metadata

Metadata

Assignees

Labels

regressionRegression in behavior compared to a previous version

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions