Skip to content

[runtime] Fix some more gc tracking problems in create_cattr_named/typed_arg. - #39856

Merged
akoeplinger merged 2 commits into
dotnet:masterfrom
vargaz:fix-cattr-gc-2
Jul 24, 2020
Merged

akoeplinger merged 2 commits into
dotnet:masterfrom
vargaz:fix-cattr-gc-2

Conversation

@vargaz

@vargaz vargaz commented Jul 23, 2020

Copy link
Copy Markdown
Contributor

No description provided.

@ghost

ghost commented Jul 23, 2020

Copy link
Copy Markdown

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

@steveisok

Copy link
Copy Markdown
Member

#39473

Comment thread src/mono/mono/metadata/handle.h Outdated
#define MONO_HANDLE_CAST(type, value) (MONO_HANDLE_CAST_FOR (type) ((value).__raw))

/* Simpler version if the handle is not used */
#define MONO_HANDLE_PIN(object) MONO_HANDLE_NEW (MonoObject, (object))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this only works for MonoObjects, the macro name should probably have that at the end. I'm assuming that's the case since you didn't use it above for the MonoArray?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should work for all objects, we might need to put casts into it in the future to make that happen.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think I'd rather just put the casts in and use for the MonoArray in this PR then, but it's not a huge deal.

@akoeplinger
akoeplinger merged commit dd7edf8 into dotnet:master Jul 24, 2020
vargaz added a commit to vargaz/runtime that referenced this pull request Jul 24, 2020
akoeplinger pushed a commit that referenced this pull request Jul 27, 2020
* [runtime] Make sure newly created objects are pinned during a runtime invoke in create_cattr_typed/named_arg (). (#39774)

Hopefully helps with #39473.

* [runtime] Fix some more gc tracking problems in create_cattr_named/typed_arg. (#39856)
Jacksondr5 pushed a commit to Jacksondr5/runtime that referenced this pull request Aug 10, 2020
@karelz karelz added this to the 5.0.0 milestone Aug 18, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 8, 2020
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.

5 participants