runtime: Environment.FailFast is reported as ExecutionEngineException
Description
However, according to the docs, this one is no longer being raised
Reproduction Steps
Run the following (This reproduces without running under the debugger):
Variant 1:
Environment.FailFast("Testing");
Variant 2:
using System.Runtime.InteropServices;
var sectionBytes = new byte[2912012];
var funcAddr = 1828651008u;
Marshal.Copy(sectionBytes, 0, (IntPtr)funcAddr, sectionBytes.Length);
Expected behavior
There is a reported usage of Environment.FailFast
Actual behavior
An unhandled ExecutionEngineException is reported.
Regression?
No response
Known Workarounds
No response
Configuration
.NET 7.0.100-alpha.1.21568.2 OS: Windows 10 Pro Version 21H1 (Build 19043.1415) Architecture: AMD64
About this issue
- Original URL
- State: open
- Created 3 years ago
- Comments: 32 (31 by maintainers)
Hmm, actually, the issue is not due to the address not being in the null reference detection area. The failure with size=2049 happens at address 0x20, so it should have been reported as null reference. I’ll investigate it further.