Closed
Description
Description
I have a UWP app that builds and run without issue in debug mode. When we attempt to run the release version with code optimization enabled and targeting ARM64 it throws an exception. If I target x64, there is no exception.
Reproduction Steps
Run the provided sample application with code optimization enabled and targeting ARM64.
Expected behavior
The optimized code should not trigger an exception and run like it does for other architectures.
Actual behavior
When it processes the WithGreeting
method on an optimized build for ARM64 it throws an exception.
Unhandled exception at 0x00007FFA3A2AD520 (SharedLibrary.dll) in LDTest.exe: 0x00001007.
System.Private.SharedLibrary.Interop.Generated.dll!__Interop.api_ms_win_core_kernel32_legacy_l1_1_0_dll.PInvoke_RaiseFailFastException(Interop._EXCEPTION_RECORD* pExceptionRecord = 0x0000000000000000, System.IntPtr pContextRecord = 0x0000000000000007, uint dwFlags = 2248957584)
System.Private.CoreLib.dll!System.RuntimeExceptionHelpers.FailFast(string message, System.Exception exception, System.RuntimeExceptionHelpers.RhFailFastReason reason = Unknown, System.IntPtr pExAddress = 0x0000000000000007, System.IntPtr pExContext = 0x000000495cbfc930) Line 236
at f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\System\RuntimeExceptionHelpers.cs(236)
System.Private.CoreLib.dll!System.RuntimeExceptionHelpers.RuntimeFailFast(System.RuntimeExceptionHelpers.RhFailFastReason reason, System.Exception exception, System.IntPtr pExAddress, System.IntPtr pExContext) Line 193
at f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\System\RuntimeExceptionHelpers.cs(193)
Regression?
No response
Known Workarounds
Using a foreach loop and removing the Where
method as shown in this PR https://github.com/launchdarkly/dotnet-sdk-internal/pull/42/files seems to prevent the error from happening.
Configuration
No response
Other information
No response