Skip to content

Commit 69483a0

Browse files
Workaround for #93442 (#93529)
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
1 parent cbe1474 commit 69483a0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/coreclr/inc/safemath.h

+8
Original file line numberDiff line numberDiff line change
@@ -688,6 +688,10 @@ template<typename T> class ClrSafeInt
688688
INDEBUG( mutable bool m_checkedOverflow; )
689689
};
690690

691+
#if defined(_MSC_VER) && defined(HOST_ARM64) // Workaround for https://github.com/dotnet/runtime/issues/93442
692+
#pragma optimize("", off)
693+
#endif
694+
691695
template <>
692696
inline bool ClrSafeInt<int64_t>::multiply(int64_t lhs, int64_t rhs, int64_t &result)
693697
{
@@ -874,6 +878,10 @@ inline bool ClrSafeInt<uint8_t>::multiply(uint8_t lhs, uint8_t rhs, uint8_t &res
874878
return true;
875879
}
876880

881+
#if defined(_MSC_VER) && defined(HOST_ARM64) // Workaround for https://github.com/dotnet/runtime/issues/93442
882+
#pragma optimize("", on)
883+
#endif
884+
877885
// Allows creation of a ClrSafeInt corresponding to the type of the argument.
878886
template <typename T>
879887
ClrSafeInt<T> AsClrSafeInt(T t)

0 commit comments

Comments
 (0)