Skip to content

[mono][sgen] Fix detection of weakref objects#77170

Merged
BrzVlad merged 1 commit into
dotnet:mainfrom
BrzVlad:fix-sgen-weakref-fin
Oct 19, 2022
Merged

[mono][sgen] Fix detection of weakref objects#77170
BrzVlad merged 1 commit into
dotnet:mainfrom
BrzVlad:fix-sgen-weakref-fin

Conversation

@BrzVlad

@BrzVlad BrzVlad commented Oct 18, 2022

Copy link
Copy Markdown
Member

Comparison with mono_defaults.generic_weakreference_class was broken because that class is a generic class while the objects have as a class generic instantiations of that, so the comparison would fail. Simplify the code by adding a new gc bit where we can use name comparison.

Fixes bug from #76173

Comparison with klass mono_defaults.generic_weakreference_class was broken because that class is a generic class while the objects have as a class generic instantiations of that so the comparison would fail. Simplify the code by adding a new gc bit where we can use name comparison.
@ghost ghost added the area-GC-mono label Oct 18, 2022
@ghost ghost assigned BrzVlad Oct 18, 2022
@ghost

ghost commented Oct 18, 2022

Copy link
Copy Markdown

Tagging subscribers to this area: @BrzVlad
See info in area-owners.md if you want to be subscribed.

Issue Details

Comparison with mono_defaults.generic_weakreference_class was broken because that class is a generic class while the objects have as a class generic instantiations of that, so the comparison would fail. Simplify the code by adding a new gc bit where we can use name comparison.

Author: BrzVlad
Assignees: -
Labels:

area-GC-mono

Milestone: -

@pavelsavara

Copy link
Copy Markdown
Member

Does this fix WeakReference<T> finalizer should never run ?

@BrzVlad

BrzVlad commented Oct 19, 2022

Copy link
Copy Markdown
Member Author

Does this fix WeakReference<T> finalizer should never run ?

yes

@ghost ghost locked as resolved and limited conversation to collaborators Nov 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants