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

internal assertion error examining BigInt() constructor #515

Open
vtjnash opened this issue Nov 17, 2023 · 1 comment · May be fixed by #602
Open

internal assertion error examining BigInt() constructor #515

vtjnash opened this issue Nov 17, 2023 · 1 comment · May be fixed by #602
Labels
bug Something isn't working

Comments

@vtjnash
Copy link
Contributor

vtjnash commented Nov 17, 2023

julia> descend(BigInt, (), optimize=true, annotate_source=false)
BigInt(; nbits) @ Base.GMP gmp.jl:63
%0 = invoke BigInt()::BigInt
    @ gmp.jl:63 within `BigInt`
1%1 = invoke $(QuoteNode(Base.GMP.var"#_#1#2"()))(0::Int64, #ctor-self#::Type{BigInt})::BigInt
└──      return %1
Select a call to descend into or  to ascend. [q]uit. [b]ookmark.
Toggles: [w]arn, [h]ide type-stable statements, [t]ype annotations, [s]yntax highlight for Source/LLVM/Native, [j]ump to source always, [o]ptimize, [d]ebuginfo, [r]emarks, [e]ffects, [i]nlining costs.
Show: [S]ource code, [A]ST, [T]yped code, [L]LVM IR, [N]ative code
Actions: [E]dit source code, [R]evise and redisplay
Advanced: dump [P]arams cache.
 • %1 = < constprop > _#1(::Core.Const(0),::Core.Const(BigInt))::BigInt
   
argextype called on Expr with head :call which is not valid for IR in argument-position.
ERROR: AssertionError: false
Stacktrace:
  [1] argextype(x::Any, src::Core.Compiler.IRCode, sptypes::Vector{Core.Compiler.VarState}, slottypes::Vector{Any})
    @ Core.Compiler ./compiler/optimize.jl:368
  [2] #11
    @ Cthulhu ~/.julia/packages/Cthulhu/Ndnbu/src/reflection.jl:53 [inlined]
  [3] map!(f::Cthulhu.var"#11#12"{Core.Compiler.IRCode, Vector{Any}, Vector{Core.Compiler.VarState}}, dest::Vector{Any}, A::Vector{Any})
    @ Base ./abstractarray.jl:3300
  [4] mapany(f::Function, A::Vector{Any})
    @ Base ./abstractarray.jl:3309
  [5] find_callsites(interp::Cthulhu.CthulhuInterpreter, CI::Core.Compiler.IRCode, stmt_infos::Vector{Core.Compiler.CallInfo}, mi::Core.MethodInstance, slottypes::Vector{Any}, optimize::Bool, annotate_source::Bool)
    @ Cthulhu ~/.julia/packages/Cthulhu/Ndnbu/src/reflection.jl:52
  [6] 
    @ Cthulhu ~/.julia/packages/Cthulhu/Ndnbu/src/Cthulhu.jl:468
  [7] 
    @ Cthulhu ~/.julia/packages/Cthulhu/Ndnbu/src/Cthulhu.jl:610
  [8] _descend(term::REPL.Terminals.TTYTerminal, interp::Cthulhu.CthulhuInterpreter, mi::Core.MethodInstance; kwargs::@Kwargs{iswarn::Bool, optimize::Bool, annotate_source::Bool})
    @ Cthulhu ~/.julia/packages/Cthulhu/Ndnbu/src/Cthulhu.jl:756
  [9] _descend(term::REPL.Terminals.TTYTerminal, args::Any; interp::Core.Compiler.NativeInterpreter, kwargs::@Kwargs{iswarn::Bool, optimize::Bool, annotate_source::Bool})
    @ Cthulhu ~/.julia/packages/Cthulhu/Ndnbu/src/Cthulhu.jl:772
 [10] __descend_with_error_handling(args::Any; terminal::Any, kwargs...)
    @ Cthulhu ~/.julia/packages/Cthulhu/Ndnbu/src/Cthulhu.jl:213
 [11] _descend_with_error_handling(f::Any, argtypes::Any; kwargs::@Kwargs{iswarn::Bool, optimize::Bool, annotate_source::Bool})
    @ Cthulhu ~/.julia/packages/Cthulhu/Ndnbu/src/Cthulhu.jl:202
 [12] descend_code_typed(::Any, ::Vararg{Any}; kwargs::@Kwargs{optimize::Bool, annotate_source::Bool})
    @ Cthulhu ~/.julia/packages/Cthulhu/Ndnbu/src/Cthulhu.jl:160
 [13] top-level scope
    @ REPL[4]:1
Some type information was truncated. Use `show(err)` to see complete types.
@simeonschaub simeonschaub added the bug Something isn't working label Sep 1, 2024
@fingolfin
Copy link
Contributor

Still happens with Julia 1.10.5 and Cthulhu 2.15.0

simeonschaub added a commit that referenced this issue Sep 26, 2024
@simeonschaub simeonschaub linked a pull request Sep 26, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants