Skip to content

gc: add missing root for binding->ty field #46804

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

Closed
wants to merge 1 commit into from
Closed

Conversation

vtjnash
Copy link
Member

@vtjnash vtjnash commented Sep 16, 2022

Previously, we might observe this code segfault if the memory at binding->ty eventually was reused due to this missing GC root.

julia> x::Union{Int,Nothing} = 2
2

julia> GC.gc()

julia> Core.get_binding_type(Main, :x)
Union{Nothing, Int64}

@vtjnash vtjnash added GC Garbage collector bugfix This change fixes an existing bug backport 1.8 Change should be backported to release-1.8 labels Sep 16, 2022
@staticfloat staticfloat deleted the jn/binding->ty+root branch September 16, 2022 21:07
@KristofferC KristofferC removed the backport 1.8 Change should be backported to release-1.8 label Sep 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This change fixes an existing bug GC Garbage collector
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants