Skip to content

StackOverflowError in Test.detect_ambiguities(Base) after importing certain packages #36883

@jishnub

Description

@jishnub

Based on this discourse discussion, it appears that certain packages result in a StackOverflowError while using Test.detect_ambiguities. An example of this is Hecke.jl

julia> using Hecke
[banner suppressed]

julia> Test.detect_ambiguities(Base)
ERROR: StackOverflowError:
Stacktrace:
 [1] _methods_by_ftype at ./reflection.jl:841 [inlined]
 [2] _methods_by_ftype(::Any, ::Int64, ::UInt64) at ./reflection.jl:838
 [3] isambiguous(::Method, ::Method; ambiguous_bottom::Bool) at ./reflection.jl:1301
 [4] detect_ambiguities(::Module; imported::Bool, recursive::Bool, ambiguous_bottom::Bool) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Test/src/Test.jl:1440
 [5] detect_ambiguities(::Module) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Test/src/Test.jl:1415
 [6] top-level scope at REPL[3]:1

This is using Hecke v0.8.4 on Julia v1.4.2, and the error persists on Julia v1.5.0-rc2:

julia> Test.detect_ambiguities(Base)
ERROR: StackOverflowError:
Stacktrace:
 [1] _methods_by_ftype at ./reflection.jl:858 [inlined]
 [2] _methods_by_ftype(::Any, ::Int64, ::UInt64) at ./reflection.jl:855
 [3] isambiguous(::Method, ::Method; ambiguous_bottom::Bool) at ./reflection.jl:1308
 [4] detect_ambiguities(::Module; imported::Bool, recursive::Bool, ambiguous_bottom::Bool) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/Test/src/Test.jl:1446
 [5] detect_ambiguities(::Module) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/Test/src/Test.jl:1421
 [6] top-level scope at REPL[4]:1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIndicates an unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions