-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Some tests failed when testing with debug version #46064
Comments
Another interesting question: Do we need to define an A search shows |
You can hit the InteractiveUtils bug (and same error in the
|
Here's something that's a bit more M(medium)WE; @inkydragon's example above is even better, but this at least shows that the issue occurs outside of test suites: pkg> dev LLVMExtra_jll
shell> cd ~/.julia/dev/LLVMExtra_jll/.pkg
julia> include("select_artifacts.jl") |
For the julia> Core.Compiler.junk[1]
Core.Compiler.InferenceState(Toplevel MethodInstance thunk from Main starting at REPL[1]:2, 0x00000000000077ce, Main, Any[], Any[], CodeInfo(
@ REPL[1]:2 within `top-level scope`
1 ─ $(Expr(:foreigncall, :(Core.tuple(:get_c_int, "libccalltest")), Int32, svec(), 0, :(:ccall)))::Int32
│ @ REPL[1]:3 within `top-level scope`
│ %2 = Main.cglobal(Core.tuple(:finalizer_cptr, "libccalltest"))::Ptr{Nothing}
└── return %2
), 1 =>
, -1, 3, Core.Compiler.BitSet(UInt64[0x0000000000000000], 0), [0, 0, 0], Core.Compiler.BitSet[Core.Compiler.BitSet(UInt64[], -1152921504606846976), Core.Compiler.BitSet(UInt64[0x0000000000000008], 0), Core.Compiler.BitSet(UInt64[], -1152921504606846976)], Union{Nothing, Vector{Core.Compiler.VarState}}[Core.Compiler.VarState[]], Any[Int32, Ptr{Nothing}, Any], Union{Nothing, Vector{Any}}[Any[], nothing, nothing], Any[nothing, false, nothing], Core.Compiler.IdSet{Core.Compiler.InferenceState}(Core.Compiler.IdDict{Core.Compiler.InferenceState, Nothing}(Any[#undef, #undef, #undef, #undef, #undef, #undef, #undef, #undef, #undef, #undef … #undef, #undef, #undef, #undef, #undef, #undef, #undef, #undef, #undef, #undef], 0, 0)), Core.Compiler.IdSet{Core.Compiler.InferenceState}(Core.Compiler.IdDict{Core.Compiler.InferenceState, Nothing}(Any[#undef, #undef, #undef, #undef, #undef, #undef, #undef, #undef, #undef, #undef … #undef, #undef, #undef, #undef, #undef, #undef, #undef, #undef, #undef, #undef], 0, 0)), Tuple{Core.Compiler.InferenceState, Int64}[], Core.Compiler.InferenceState[], true, nothing, true, Error showing value of type Core.Compiler.InferenceState:
ERROR: UndefVarError: name not defined
... (yes, display of the frame failed). For the InteractiveUtils version, it's julia> Core.Compiler.junk[1]
Core.Compiler.InferenceState(MethodInstance for f_broken_code(), 0x00000000000077d1, Main, Any[], Any[Core.Const(f_broken_code)], CodeInfo(
1 ─ $(Expr(:meta, :noinline))
│ @ REPL[1]:1 within `f_broken_code`
└── return $(Expr(:invalid))
), 1 =>
, -1, 2, Core.Compiler.BitSet(UInt64[0x0000000000000000], 0), [0, 0], Core.Compiler.BitSet[Core.Compiler.BitSet(UInt64[], -1152921504606846976), Core.Compiler.BitSet(UInt64[], -1152921504606846976)], Union{Nothing, Vector{Core.Compiler.VarState}}[Core.Compiler.VarState[Core.Compiler.VarState(Core.Const(f_broken_code), false)]], Any[Nothing, Any], Union{Nothing, Vector{Any}}[Any[], nothing], Any[nothing, nothing], Core.Compiler.IdSet{Core.Compiler.InferenceState}(Core.Compiler.IdDict{Core.Compiler.InferenceState, Nothing}(Any[#undef, #undef, #undef, #undef, #undef, #undef, #undef, #undef, #undef, #undef … #undef, #undef, #undef, #undef, #undef, #undef, #undef, #undef, #undef, #undef], 0, 0)), Core.Compiler.IdSet{Core.Compiler.InferenceState}(Core.Compiler.IdDict{Core.Compiler.InferenceState, Nothing}(Any[#undef, #undef, #undef, #undef, #undef, #undef, #undef, #undef, #undef, #undef … #undef, #undef, #undef, #undef, #undef, #undef, #undef, #undef, #undef, #undef], 0, 0)), Tuple{Core.Compiler.InferenceState, Int64}[], Core.Compiler.InferenceState[], true, nothing, true, f_broken_code() => Any, Core.Compiler.WorldRange(0x0000000000000001, 0x00000000000077d1), Any, (+c,+e,+n,+t,+s), Core.Compiler.InferenceParams(true, false, true, 3, 4, 8, 3, 32), false, true, Core.Compiler.NativeInterpreter(...)) |
env
TODO
compiler/codegen
ccall
misc
:GC.enable_finalizers
InteractiveUtils
:f_broken_code
Errors
Build:
make -j `nproc` debug
compiler/codegen
run:
make -C test/ compiler/codegen debug
long logs
errors:
patch: add an if branch
ccall(:jl_is_debugbuild, Cint, ()) != 0
ccall
run code with debug version:
long logs
errors:
misc
Expected behavior: output warning
long logs
run:
make -C test/ misc debug
errors:
julia/base/gcutils.jl
Lines 121 to 128 in 6008cbc
julia/src/gc.c
Lines 445 to 467 in 6008cbc
InteractiveUtils
Expected behavior: throw an internal errors: "Internal error: encountered unexpected error during compilation of f_broken_code:"
I'm not quite sure if this is a bug
If it's not a bug, then just create a new branch for the test
looooooong logs
run:
make -C test/ InteractiveUtils debug
errors:
julia/stdlib/InteractiveUtils/test/runtests.jl
Lines 364 to 369 in 6008cbc
The text was updated successfully, but these errors were encountered: