Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Use DynamicSecurityMethod attribute to mark methods with StackCrawlMark#9491

Merged
jkotas merged 2 commits into
dotnet:masterfrom
jkotas:NoInlining
Feb 11, 2017
Merged

Use DynamicSecurityMethod attribute to mark methods with StackCrawlMark#9491
jkotas merged 2 commits into
dotnet:masterfrom
jkotas:NoInlining

Conversation

@jkotas
Copy link
Copy Markdown
Member

@jkotas jkotas commented Feb 10, 2017

CoreCLR does not have CAS, and so we can conveniently use it to mark methods with StackCrawlMark to
decouple it from NoInlining. The original purpose of DynamicSecurityMethod was to disable inlining
of the caller and to insert CAS security checks, so we are basically just keeping the first part.

Fixes #8102

@stephentoub
Copy link
Copy Markdown
Member

This error message that was fixed yesterday by @AndyAyersMS is now wrong, again, right?
https://github.com/dotnet/coreclr/pull/9470/files#diff-edc46b80f57431489a82311948a8234dR6522

@benaadams
Copy link
Copy Markdown
Member

I feel I should ask if the Jit changes will break on desktop; but have no idea about the relationship between the code bases to know if that's a valid question.

@jkotas
Copy link
Copy Markdown
Member Author

jkotas commented Feb 10, 2017

The part shared with desktop is https://github.com/dotnet/coreclr/tree/master/src/jit . There are no changes in this part.

@jkotas
Copy link
Copy Markdown
Member Author

jkotas commented Feb 10, 2017

This error message that was fixed yesterday by @AndyAyersMS is now wrong, again, right?

Yes, the original message was more accurate. I will revert it.

@AndyAyersMS
Copy link
Copy Markdown
Member

LGTM. Nice to have this finally ironed out.

CoreCLR does not have CAS, and so we can conveniently use it to mark methods with StackCrawlMark to
decouple it from NoInlining. The original purpose of DynamicSecurityMethod was to disable inlining
of the caller and to insert CAS security checks, so we are basically just keeping the first part.

Fixes #8102
@jkotas jkotas merged commit e5f2df2 into dotnet:master Feb 11, 2017
@jamesqo
Copy link
Copy Markdown

jamesqo commented Feb 11, 2017

Nice! This will be useful in a bunch of places, e.g. Char to separate out the uncommon path so the more used one can be inlined.

@jkotas jkotas deleted the NoInlining branch February 11, 2017 06:03
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
Use DynamicSecurityMethod attribute to mark methods with StackCrawlMark

Commit migrated from dotnet/coreclr@e5f2df2
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants