1. 29 6月, 2021 7 次提交
  2. 28 6月, 2021 12 次提交
  3. 27 6月, 2021 10 次提交
    • J
      Fix MacOS build on 11.x SDK and Catalyst build (#54506) · 385b6f3e
      Jan Vorlicek 提交于
      * Fix MacOS build on 11.x SDK and Catalyst build
      
      The configure.cmake was not getting the minimum supported OS version because
      it was being set via set_compile_options and the config functions can only
      get options from CMAKE_XXX_FLAGS.
      
      * Add comment explaining why we set the macOS options via CMAKE_XXX_FLAGS
      385b6f3e
    • S
      Make DependentHandle public (#54246) · 02f70d0b
      Sergio Pedri 提交于
      * Move DependentHandle to System.Runtime
      
      * Update DependentHandle APIs to follow review
      
      * Make DependentHandle type public
      
      * Update DependentHandle on Mono runtime
      
      * Add allocation checks to DependentHandle APIs
      
      This avoids throwing ExecutionEngineException-s if one of the public APIs is called on a non-allocated DependentHandle instance
      
      * Add more unit tests for new public DependentHandle APIs
      
      * Add faster, unsafe internal APIs versions to DependentHandle
      
      * Naming improvements to Ephemeron type
      
      The ephemeron type is checked in the Mono runtime in "object.c" as follows:
      
      m_class_get_image (klass) == mono_defaults.corlib && !strcmp ("Ephemeron", m_class_get_name (klass))
      
      As such, the namespace it belongs to in the managed runtime doesn't matter: the VM will just check
      that the type name matches, and that the type is in fact defined in corelib. This means we can
      just move it to System.Runtime without worrying about it being properly managed in the VM.
      Additionally, the type is defined in "sgen-mono.c" as follows:
      
      typedef struct {
          GCObject* key;
          GCObject* value;
      } Ephemeron;
      
      So as long as the layout matches the one of the type defined in C# (which it does), we're also free
      to rename the fields to better follow the naming guidelines, and the VM will have no issues with it.
      
      * Code style tweaks, improved nullability annotations
      
      * Remove incorrect DependentHandle comment on Mono
      
      * Add default Dispose test for DependentHandle
      Co-authored-by: NStephen Toub <stoub@microsoft.com>
      
      * Fix race condition in DependentHandle on Mono
      
      * Optimize DependentHandle.nGetPrimary on CoreCLR
      
      Removed internal call, same optimization as GCHandle
      
      * Small IL codegen improvement in DependentHandle.nGetPrimary
      
      * Simplify comments, add #ifdef for using directive
      
      * Minor code style tweaks
      
      * Change nGetPrimaryAndSecondary to nGetSecondary
      
      * Minor code refactoring to DependentHandle on Mono
      
      * Rename DependentHandle FCalls
      
      * Remove DependentHandle.UnsafeGetTargetAndDependent
      
      * Remove DependentHandle.GetTargetAndDependent
      
      * Fix FCall path for internal DependentHandle APIs
      
      * Add more DependentHandle unit tests
      
      * Reintroduce DependentHandle.GetTargetAndDependent()
      
      This fixes a bug due to a race condition in ConditionalWeakTable<K, V>, which relies on this method which atomically retrieves both target and dependent with respect to target being set to null concurrently by other threads. This also exposes the same API publically to allow consumers to potentially implement custom conditional weak tables in the same manner.
      
      * Minor IL tweaks to produce smaller IR in the JIT
      
      * Add DependentHandle.StopTracking() API
      
      This also fixes two potential GC holes when setting DependentHandle.Target (see conversation from https://github.com/dotnet/runtime/pull/54246#issuecomment-863285327 onwards)
      
      * Rename InternalSetTarget to StopTracking, remove redundant param
      
      * Remove FCUnique from InternalStopTracking
      
      This was added in https://github.com/dotnet/runtime/pull/39810 to avoid a collision with MarshalNative::GCHandleInternalSet, as the two FCalls had identical implementations and their entry points were not unique. This should no longer be needed after 099fc478551f46cc54e7a18a32d9a9ac73727c73, as that changed both the signature and the implementation of this FCall.
      
      * Update API surface to match approved specs from API review
      
      * Update DependentHandle XML docs
      Co-authored-by: NStephen Toub <stoub@microsoft.com>
      02f70d0b
    • A
      More file stream options tests (#53982) · 2abd4878
      Adam Sitnik 提交于
      * add more tests
      
      * StreamWriter and StreamReader require FileStreamOptions with necessary access
      
      * allow for bufferSize == 0
      
      * extend the test
      
      * refactor the tests
      
      * Revert "allow for bufferSize == 0"
      
      This reverts commit f1259be18a3446c1b8939883f484cc28347c74cf.
      2abd4878
    • J
      aca3754a
    • S
      Fix WaitForNextTickAsync_CanceledWaitThenWaitAgain_Succeeds test (#54775) · 46b5fdc8
      Stephen Toub 提交于
      There's a race condition in the test between the timer firing and cancellation being requested.  It repros more on Linux because there's a smaller quantum on Linux than on Windows.
      46b5fdc8
    • D
      Expose underlying unix file descriptor in SafeMemoryMappedFileHandle (#53538) · c2e8973c
      Danny Friar 提交于
      * expose unix file descriptor safe memory map
      
      * store handle after DangerousAddRef
      
      * add test verifying handle matches filestream handle
      
      * Update src/libraries/System.IO.MemoryMappedFiles/src/Microsoft/Win32/SafeMemoryMappedFileHandle.Unix.cs
      Co-authored-by: NStephen Toub <stoub@microsoft.com>
      
      * Update src/libraries/System.IO.MemoryMappedFiles/src/Microsoft/Win32/SafeMemoryMappedFileHandle.Unix.cs
      Co-authored-by: NStephen Toub <stoub@microsoft.com>
      
      * Update src/libraries/System.IO.MemoryMappedFiles/src/Microsoft/Win32/SafeMemoryMappedFileHandle.Unix.cs
      Co-authored-by: NStephen Toub <stoub@microsoft.com>
      
      * Update src/libraries/System.IO.MemoryMappedFiles/src/Microsoft/Win32/SafeMemoryMappedFileHandle.Unix.cs
      Co-authored-by: NStephen Toub <stoub@microsoft.com>
      
      * Update src/libraries/System.IO.MemoryMappedFiles/tests/MemoryMappedFile.CreateFromFile.Tests.cs
      Co-authored-by: NStephen Toub <stoub@microsoft.com>
      
      * Dispose MemoryMappedFile in MapHandleMatchesFileStreamHandle test
      
      * Update src/libraries/System.IO.MemoryMappedFiles/src/Microsoft/Win32/SafeMemoryMappedFileHandle.Unix.cs
      Co-authored-by: NStephen Toub <stoub@microsoft.com>
      
      * Update MemoryMappedFile.CreateFromFile.Tests.cs
      
      * Move mmf in test to using block
      
      * Fix test
      Co-authored-by: NDanny Friar <danny@Dannys-MacBook-Pro.local>
      Co-authored-by: NStephen Toub <stoub@microsoft.com>
      c2e8973c
    • T
    • T
      add pre-cancellation check and enable... · 3b3d20de
      Tomas Weinfurt 提交于
      add pre-cancellation check and enable ReadWriteAsync_PrecanceledOperations_ThrowsCancellationException for QUIC (#54540)
      
      3b3d20de
    • V
      [interp] Don't cprop between vt vars of different sizes (#54734) · 11967d4c
      Vlad Brezae 提交于
      Via unsafe code, getting the lower Vector128 from a Vector256 ends up as a move of `sizeof (Vector128)` from a Vector256 var. However, the destination var is not a valid copy of the source var, having a different type
      11967d4c
    • J
      Revert "Fix 54025 (#54070)" (#54728) · db143a07
      Juan Hoyos 提交于
      This reverts commit b2fe6678.
      db143a07
  4. 26 6月, 2021 11 次提交