Skip to content

obvious-subtype bug observed on ill-formed types #34170

@vtjnash

Description

@vtjnash
pkg> test Tulip
Assertion failed: (subtype_ab == 3 || subtype_ab == subtype || jl_has_free_typevars(a) || jl_has_free_typevars(b)), function jl_types_equal, file /Users/jameson/julia/src/subtype.c, line 1919.
(lldb) p jl_(a)
Tuple{typeof(MathOptInterface.Utilities.operate), typeof(Base.:(+)), Type{T}, MathOptInterface.ScalarAffineFunction{T}, T where T<:Union{MathOptInterface.ScalarAffineFunction{T}, T}} where T<:(T where T<:MathOptInterface.ScalarAffineFunction{T} where T)
(lldb) p jl_(b)
Tuple{typeof(MathOptInterface.Utilities.operate), typeof(Base.:(+)), Type{T}, MathOptInterface.ScalarAffineFunction{T}, T where T<:Union{MathOptInterface.ScalarAffineFunction{T}, T}} where T<:(T where T<:MathOptInterface.ScalarAffineFunction{T} where T)
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
    frame #0: 0x00007fff5f9722c2 libsystem_kernel.dylib`__pthread_kill + 10
    frame #1: 0x00007fff5fa2dbf1 libsystem_pthread.dylib`pthread_kill + 284
    frame #2: 0x00007fff5f8dc6a6 libsystem_c.dylib`abort + 127
    frame #3: 0x00007fff5f8a520d libsystem_c.dylib`__assert_rtn + 324
  * frame #4: 0x00000001002cbea9 libjulia-debug.dylib`jl_types_equal(a=0x0000000111d82350, b=0x0000000112e07330) at subtype.c:1919:9
    frame #5: 0x00000001061c8fcc sys-debug.dylib`julia_==_1810 at operators.jl:163
    frame #6: 0x00000001061c9026 sys-debug.dylib`jfptr_==_1811 + 22
    frame #7: 0x000000010023a03c libjulia-debug.dylib`_jl_invoke(F=0x000000010997cbd0, args=0x0000000122fec7b8, nargs=2, mfunc=0x0000000107773da0, world=3870) at gf.c:2144:31
    frame #8: 0x000000010023a793 libjulia-debug.dylib`jl_apply_generic(F=0x000000010997cbd0, args=0x0000000122fec7b8, nargs=2) at gf.c:2322:12
    frame #9: 0x0000000106120d34 sys-debug.dylib`julia_abstract_call_method_735 at abstractinterpretation.jl:281
    frame #10: 0x00000001061225ca sys-debug.dylib`julia_abstract_call_gf_by_type_653 at abstractinterpretation.jl:101
    frame #11: 0x000000010612f088 sys-debug.dylib`julia_abstract_call_known_566 at abstractinterpretation.jl:873
    frame #12: 0x000000010613276f sys-debug.dylib`julia_abstract_call_564 at abstractinterpretation.jl:895
    frame #13: 0x0000000106132876 sys-debug.dylib`japi1_abstract_call_563 at abstractinterpretation.jl:880
    frame #14: 0x000000010613429f sys-debug.dylib`japi1_abstract_eval_558 at abstractinterpretation.jl:974
    frame #15: 0x00000001061373db sys-debug.dylib`japi1_typeinf_local_468 at abstractinterpretation.jl:1227
    frame #16: 0x000000010613b29a sys-debug.dylib`julia_typeinf_nocycle_466 at abstractinterpretation.jl:1283
    frame #17: 0x00000001061c43af sys-debug.dylib`julia_typeinf_464 at typeinfer.jl:12
    frame #18: 0x000000010612066c sys-debug.dylib`japi1_typeinf_edge_746 at typeinfer.jl:488

Metadata

Metadata

Assignees

Labels

bugIndicates an unexpected problem or unintended behaviortypes and dispatchTypes, subtyping and method dispatch

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions