Open
Description
CoreCLR has a macro named TRASH_LASTERROR
in utilcode that is used to make it easier to detect when the "last system error code" is not preserved in P/Invoke scenarios.
However, it leaks out in a number of non-P/Invoke scenarios, which impacts some of the DllImportGenerator tests that use DNNE to make the logic of the native side of the generated code tests implemented in managed code. This causes test failures with a Debug/Checked runtime since the expected error code is not set since CoreCLR sets an error code value and leaves it set.
For example, it leaks out of coreclr_create_delegate
's calls to StringToUnicode
, as well as ComponentActivator
's calls to Marshal.PtrToStringAuto
.
Metadata
Metadata
Assignees
Type
Projects
Status
No status