Skip to content

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

Closed
vtjnash wants to merge 1 commit intomasterfrom
jn/binding->ty+root
Closed

gc: add missing root for binding->ty field#46804
vtjnash wants to merge 1 commit intomasterfrom
jn/binding->ty+root

Conversation

@vtjnash
Copy link
Copy Markdown
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