Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BoundsErrror when showing a certain IR #57704

Closed
KristofferC opened this issue Mar 10, 2025 · 2 comments
Closed

BoundsErrror when showing a certain IR #57704

KristofferC opened this issue Mar 10, 2025 · 2 comments
Labels
bug Indicates an unexpected problem or unintended behavior display and printing Aesthetics and correctness of printed representations of objects.

Comments

@KristofferC
Copy link
Member

KristofferC commented Mar 10, 2025

julia> Meta.lower(Main, :(
       let

       let
           import SHA: R
       end

       let
           R(x...)  = R(x)
       end

       end
       ))
Error showing value of type Expr:
ERROR: BoundsError: attempt to access 3-element Vector{String} at index [0]
Stacktrace:
  [1] throw_boundserror(A::Vector{String}, I::Tuple{Int64})
    @ Base ./essentials.jl:15
  [2] getindex
    @ ./essentials.jl:917 [inlined]
  [3] show_unquoted
    @ ./show.jl:1850 [inlined]
  [4] show_unquoted(io::IOContext{IOBuffer}, ex::Core.SlotNumber, indent::Int64, prec::Int64, ::Int64)
    @ Base ./show.jl:1512
  [5] show_unquoted_quote_expr(io::IOContext{IOBuffer}, value::Any, indent::Int64, prec::Int64, quote_level::Int64)
    @ Base ./show.jl:1888
  [6] show(io::IOContext{IOBuffer}, ex::Core.SlotNumber)
    @ Base ./show.jl:1508
  [7] _show_default(io::IOContext{IOBuffer}, x::Any)
    @ Base ./show.jl:504
  [8] show_default
    @ ./show.jl:487 [inlined]
  [9] show
    @ ./show.jl:482 [inlined]
 [10] show_unquoted
    @ ./show.jl:1511 [inlined]
 [11] show_unquoted(io::IOContext{IOBuffer}, ex::Core.NewvarNode, indent::Int64, prec::Int64, ::Int64)
    @ Base ./show.jl:1512

The code as taken from #57702

It is possible the IR is corrupt and fixing #57702 also fixes this.

@KristofferC
Copy link
Member Author

When running it twice, it seems to print... Not sure what is going on with that.

@KristofferC KristofferC added bug Indicates an unexpected problem or unintended behavior display and printing Aesthetics and correctness of printed representations of objects. labels Mar 10, 2025
@KristofferC
Copy link
Member Author

Doesn't repro anymore so #57774 probably fixed this as well. Don't think it is worth investigating this further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior display and printing Aesthetics and correctness of printed representations of objects.
Projects
None yet
Development

No branches or pull requests

1 participant