From ab27635608d11ccb55bd6695453fe5355c5a9a1b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 10 Nov 2025 16:44:13 +0000 Subject: [PATCH 1/2] Initial plan From e57956186e129e194251b257ddf0ea743773b290 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 10 Nov 2025 16:49:45 +0000 Subject: [PATCH 2/2] Fix MemoryMarshal.AsBytes conversion error in BigInteger Co-authored-by: steveisok <471438+steveisok@users.noreply.github.com> --- .../System.Runtime.Numerics/src/System/Numerics/BigInteger.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/System.Runtime.Numerics/src/System/Numerics/BigInteger.cs b/src/libraries/System.Runtime.Numerics/src/System/Numerics/BigInteger.cs index e173705da39c47..dced09c94df283 100644 --- a/src/libraries/System.Runtime.Numerics/src/System/Numerics/BigInteger.cs +++ b/src/libraries/System.Runtime.Numerics/src/System/Numerics/BigInteger.cs @@ -384,7 +384,7 @@ public BigInteger(ReadOnlySpan value, bool isUnsigned = false, bool isBigE // The bytes parameter is in little-endian byte order. // We can just copy the bytes directly into the uint array. - value.Slice(0, wholeUInt32Count * 4).CopyTo(MemoryMarshal.AsBytes(val)); + value.Slice(0, wholeUInt32Count * 4).CopyTo(MemoryMarshal.AsBytes(val.AsSpan())); } // In both of the above cases on big-endian architecture, we need to perform