Remove spurious assertion check causing .NET Core crashes (#89986)
authorTomáš Rylek <trylek@microsoft.com>
Wed, 9 Aug 2023 18:59:35 +0000 (20:59 +0200)
committerGitHub <noreply@github.com>
Wed, 9 Aug 2023 18:59:35 +0000 (11:59 -0700)
* Remove spurious assertion check causing .NET Core crashes

Co-authored-by: Aaron Robinson <arobins@microsoft.com>
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
src/libraries/System.Private.CoreLib/src/System/Text/Ascii.Utility.cs

index ab55607..b6b8879 100644 (file)
@@ -2146,7 +2146,8 @@ namespace System.Text
             // jumps as much as possible in the optimistic case of "all ASCII". If we see non-ASCII
             // data, we jump out of the hot paths to targets at the end of the method.
 
-            Debug.Assert(Vector256.IsHardwareAccelerated, "Vector256 is required.");
+            // Commented out to workaround https://github.com/dotnet/runtime/issues/90265
+            // Debug.Assert(Vector256.IsHardwareAccelerated, "Vector256 is required.");
             Debug.Assert(BitConverter.IsLittleEndian, "This implementation assumes little-endian.");
             Debug.Assert(elementCount >= 2 * Vector256.Size);