WIP: save registers of tasks that were active right before GC on a ucontext_t for conservative scanning#61
Merged
udesou merged 1 commit intommtk:v1.9.2+RAIfrom Jul 11, 2024
Conversation
qinsoon
approved these changes
Jul 9, 2024
udesou
added a commit
to mmtk/mmtk-julia
that referenced
this pull request
Jul 12, 2024
Adding context field to `mmtk__jl_tls_states_t` to reflect the changes in mmtk/julia#61.
d-netto
pushed a commit
that referenced
this pull request
Jun 7, 2025
Before:
```julia-repl
julia> missing(1)
ERROR: MethodError: objects of type Missing are not callable.
In case you did not try calling it explicitly, check if a Missing has been passed as an argument to a method that expects a callable instead.
The object of type `Missing` exists, but no method is defined for this combination of argument types when trying to treat it as a callable object.┌ Error: Hint-handler nonsetable_type_hint_handler for MethodError in Base caused an error
│ exception =
│ 1-element ExceptionStack:
│ TypeError: non-boolean (Missing) used in boolean context
│ Stacktrace:
│ [1] nonsetable_type_hint_handler(io::Any, ex::Any, arg_types::Any, kwargs::Any)
│ @ Base ./errorshow.jl:1054
│ [2] show_error_hints(::IOContext{Base.TTY}, ::MethodError, ::Vector{Any}, ::Vararg{Vector{Any}})
│ @ Base.Experimental ./experimental.jl:322
│ [3] showerror(io::IO, ex::MethodError)
│ @ Base ./errorshow.jl:374
│ [4] showerror(io::IOContext{Base.TTY}, ex::MethodError, bt::Vector{Base.StackTraces.StackFrame}; backtrace::Bool)
│ @ Base ./errorshow.jl:106
│ [5] show_exception_stack(io::IOContext{Base.TTY}, stack::Base.ExceptionStack)
│ @ Base ./errorshow.jl:1017
│ [6] display_error(io::IOContext{Base.TTY}, stack::Base.ExceptionStack)
│ @ Base ./client.jl:117
│ [7] repl_display_error(errio::IO, errval::Any)
│ @ REPL ~/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.13/REPL/src/REPL.jl:565
│ [8] print_response(errio::IO, response::Any, backend::Union{Nothing, REPL.REPLBackendRef}, show_value::Bool, have_color::Bool, specialdisplay::Union{Nothing, AbstractDisplay})
│ @ REPL ~/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.13/REPL/src/REPL.jl:582
│ [9] (::REPL.var"#print_response##0#print_response##1"{REPL.LineEditREPL, Pair{Any, Bool}, Bool, Bool})(io::Any)
│ @ REPL ~/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.13/REPL/src/REPL.jl:556
│ [10] with_repl_linfo(f::Any, repl::REPL.LineEditREPL)
│ @ REPL ~/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.13/REPL/src/REPL.jl:829
│ [11] print_response(repl::REPL.AbstractREPL, response::Any, show_value::Bool, have_color::Bool)
│ @ REPL ~/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.13/REPL/src/REPL.jl:554
│ [12] (::REPL.var"#do_respond#73"{Bool, Bool, REPL.var"#setup_interface##12#setup_interface##13"{REPL.LineEditREPL, REPL.REPLHistoryProvider}, REPL.LineEditREPL, REPL.LineEdit.Prompt})(s::REPL.LineEdit.MIState, buf::Any, ok::Bool)
│ @ REPL ~/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.13/REPL/src/REPL.jl:1186
│ [13] run_interface(terminal::REPL.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
│ @ REPL.LineEdit ~/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.13/REPL/src/LineEdit.jl:2852
│ [14] run_frontend(repl::REPL.LineEditREPL, backend::REPL.REPLBackendRef)
│ @ REPL ~/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.13/REPL/src/REPL.jl:1657
│ [15] (::REPL.var"#61#62"{REPL.LineEditREPL, REPL.REPLBackendRef})()
│ @ REPL ~/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.13/REPL/src/REPL.jl:648
└ @ Base.Experimental experimental.jl:325
Stacktrace:
[1] top-level scope
@ REPL[1]:1
```
After:
```julia-repl
julia> missing(1)
ERROR: MethodError: objects of type Missing are not callable.
In case you did not try calling it explicitly, check if a Missing has been passed as an argument to a method that expects a callable instead.
The object of type `Missing` exists, but no method is defined for this combination of argument types when trying to treat it as a callable object.
Stacktrace:
[1] top-level scope
@ REPL[3]:1
```
---------
Co-authored-by: Ian Butterworth <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherry-picking changes from JuliaLang#55003 to enable saving registers of tasks that were active right before GC.
NB: Some changes need to be propagated to https://github.com/mmtk/mmtk-julia to reflect the changes in
jl_tls_states_t: see mmtk/mmtk-julia#159.