JuliaDebug / JuliaDebug/Cthulhu.jl

missing error handling in descend entry for non-types

Open
#503 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Julia
Stars
709
Forks
46
Avg merge
1d 13h
Merged PRs (30d)
2

Description

julia> descend(show, (1,))
ERROR: MethodError: no method matching widenconst(::Int64)

Inference assumes you have handled this case already before entry, usually by sanitizing with one of the entry functions (signature_type or to_tuple_type)

julia> code_lowered(show, (1,))
ERROR: argument tuple type must contain only types
Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:35
 [2] to_tuple_type(t::Any)
   @ Base ./reflection.jl:990
 [3] signature_type(f::Any, argtypes::Any)
   @ Base ./reflection.jl:1000

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with descend(show, (1,)), then compare it with the validation performed by code_lowered, signature_type, and to_tuple_type. Determine how the descend entry handles non-type argument tuples; done means it reports the invalid input instead of raising the widenconst(::Int64) MethodError.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.