Skip to content
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

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

Merged
merged 2 commits into from
Jul 24, 2020

Conversation

vargaz
Copy link
Contributor

@vargaz vargaz commented Jul 23, 2020

No description provided.

@ghost
Copy link

ghost commented Jul 23, 2020

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

@steveisok
Copy link
Member

#39473

@@ -367,6 +367,9 @@ typedef struct _MonoTypeofCastHelper *MonoTypeofCastHelper; // a pointer type un

#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
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
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
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