You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove or document Unsafe.AsPointer uses in core libraries (#99146)
* Remove or document Unsafe.AsPointer uses in System.Memory
- Also add internal helper method Unsafe.IsOpportunisticallyAligned
- And cast a pointer to IntPtr instead of int for a unit test
* Fix typo and cast size to unsigned
* Address feedback
* Changes for the rest of the core libraries
- Other than MethodHandle code for NativeAOT
- Add Unsafe.OpportunisticMisalignment
* Fix compile errors
* Add full CS8500 comment & fix compile error
Copy file name to clipboardexpand all lines: src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/NativeRuntimeEventSource.Threading.NativeSinks.cs
[UnconditionalSuppressMessage("ReflectionAnalysis","IL2026:UnrecognizedReflectionPattern",Justification="Parameters to this method are primitive and are trimmer safe")]
@@ -146,7 +146,7 @@ public void ContentionStart(Lock lockObj) =>
146
146
ContentionFlagsMap.Managed,
147
147
DefaultClrInstanceId,
148
148
lockObj.LockIdForEvents,
149
-
lockObj.ObjectIdForEvents,
149
+
ObjectIDForEvents(lockObj),
150
150
lockObj.OwningThreadId);
151
151
152
152
[UnconditionalSuppressMessage("ReflectionAnalysis","IL2026:UnrecognizedReflectionPattern",Justification="Parameters to this method are primitive and are trimmer safe")]
[UnconditionalSuppressMessage("ReflectionAnalysis","IL2026:UnrecognizedReflectionPattern",Justification="Parameters to this method are primitive and are trimmer safe")]
0 commit comments