Fix checks for methods that use StackCrawlMark#9537
Conversation
My recent changed these methods to be marked using IsMdRequireSecObject instead, but some places that have to check for it were not updated correctly.
|
Fix for failures encountered in dotnet/corefx#16064 |
|
|
||
| if (IsMdRequireSecObject(attribs)) | ||
| { | ||
| // Assume all methods marked as DynamicSecurity are |
There was a problem hiding this comment.
Can you please also add a similar comment at https://github.com/dotnet/coreclr/pull/9491/files#diff-6291818ea5a59bda1055bcd3e1d3dcddL12 so that it becomes obvious at the definition about its semantics?
|
Briefly what are StackCrawlMarks for if not partial trust scenarios? |
|
Number of APIs look at who called them and change behavior based on that. StackCrawlMarks are part of the puzzle that lets the API find who the caller was - using stackwalking. The caller is basically passed in as an implicit argument. Alternative way to implement this would be codegen magic that recognizes these and APIs; and morphs them into calls into a different internal method that takes explicit caller argument. It is how it is done in CoreRT - it avoids the need for stackwalks. |
* Fix checks for methods that use StackCrawlMark My recent changed these methods to be marked using IsMdRequireSecObject instead, but some places that have to check for it were not updated correctly.
* Fix checks for methods that use StackCrawlMark My recent changed these methods to be marked using IsMdRequireSecObject instead, but some places that have to check for it were not updated correctly. Commit migrated from dotnet/coreclr@15c2148
My recent changed these methods to be marked using IsMdRequireSecObject instead, but some
places that have to check for it were not updated correctly.