Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialize managed and native values in the ICustomMarshaler marshaler to null when the other is null. #109092

Merged
merged 2 commits into from
Oct 22, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -802,6 +802,7 @@
// COMPAT: We never pass null to MarshalManagedToNative.
if (pManagedHome is null)
{
*pNativeHome = IntPtr.Zero;
return;
}

Expand All @@ -813,6 +814,7 @@
// COMPAT: We never pass null to MarshalNativeToManaged.
if (*pNativeHome == IntPtr.Zero)
{
pManagedHome = null;

Check failure on line 817 in src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-x86 checked CoreCLR_NoR2R)

src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs#L817

src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs(817,32): error CS8625: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot convert null literal to non-nullable reference type.

Check failure on line 817 in src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-riscv64 checked CoreCLR)

src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs#L817

src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs(817,32): error CS8625: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot convert null literal to non-nullable reference type.

Check failure on line 817 in src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux_musl-arm64 Debug AllSubsets_CoreCLR_ReleaseRuntimeLibs)

src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs#L817

src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs(817,32): error CS8625: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot convert null literal to non-nullable reference type.

Check failure on line 817 in src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-armel checked CoreCLR_NonPortable)

src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs#L817

src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs(817,32): error CS8625: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot convert null literal to non-nullable reference type.

Check failure on line 817 in src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-arm Debug AllSubsets_CoreCLR_ReleaseRuntimeLibs)

src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs#L817

src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs(817,32): error CS8625: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot convert null literal to non-nullable reference type.

Check failure on line 817 in src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs

View check run for this annotation

Azure Pipelines / runtime (Build osx-x64 Debug Libraries_CheckedCoreCLR)

src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs#L817

src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs(817,32): error CS8625: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot convert null literal to non-nullable reference type.

Check failure on line 817 in src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-x64 Debug Libraries_CheckedCoreCLR)

src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs#L817

src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs(817,32): error CS8625: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot convert null literal to non-nullable reference type.

Check failure on line 817 in src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs

View check run for this annotation

Azure Pipelines / runtime (Build freebsd-x64 Debug CoreCLR)

src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs#L817

src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs(817,32): error CS8625: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot convert null literal to non-nullable reference type.

Check failure on line 817 in src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux_musl-arm checked CoreCLR_ReleaseLibraries)

src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs#L817

src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs(817,32): error CS8625: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot convert null literal to non-nullable reference type.

Check failure on line 817 in src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-arm checked CoreCLR_ReleaseLibraries)

src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs#L817

src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs(817,32): error CS8625: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot convert null literal to non-nullable reference type.

Check failure on line 817 in src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-arm64 Debug AllSubsets_CoreCLR)

src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs#L817

src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs(817,32): error CS8625: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot convert null literal to non-nullable reference type.

Check failure on line 817 in src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-x64 Debug CoreCLR_Libraries)

src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs#L817

src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs(817,32): error CS8625: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot convert null literal to non-nullable reference type.

Check failure on line 817 in src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-arm64 Debug Libraries_CheckedCoreCLR)

src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs#L817

src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs(817,32): error CS8625: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot convert null literal to non-nullable reference type.

Check failure on line 817 in src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux_musl-x64 Debug AllSubsets_CoreCLR)

src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs#L817

src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs(817,32): error CS8625: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot convert null literal to non-nullable reference type.

Check failure on line 817 in src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux_musl-x64 Debug Libraries_CheckedCoreCLR)

src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs#L817

src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs(817,32): error CS8625: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot convert null literal to non-nullable reference type.

Check failure on line 817 in src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux_musl-arm64 checked CoreCLR_ReleaseLibraries)

src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs#L817

src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs(817,32): error CS8625: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot convert null literal to non-nullable reference type.

Check failure on line 817 in src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux-x64 checked CoreCLR_ReleaseLibraries)

src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs#L817

src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs(817,32): error CS8625: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot convert null literal to non-nullable reference type.

Check failure on line 817 in src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux_musl-x64 Debug CoreCLR_Libraries)

src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs#L817

src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs(817,32): error CS8625: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot convert null literal to non-nullable reference type.

Check failure on line 817 in src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs

View check run for this annotation

Azure Pipelines / runtime (Build linux_musl-arm Debug AllSubsets_CoreCLR_ReleaseRuntimeLibs)

src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs#L817

src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs(817,32): error CS8625: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot convert null literal to non-nullable reference type.

Check failure on line 817 in src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs

View check run for this annotation

Azure Pipelines / runtime (Build osx-arm64 Debug AllSubsets_CoreCLR)

src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs#L817

src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs(817,32): error CS8625: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot convert null literal to non-nullable reference type.

Check failure on line 817 in src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs

View check run for this annotation

Azure Pipelines / runtime (Build osx-x64 Debug CoreCLR_Libraries)

src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs#L817

src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs(817,32): error CS8625: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot convert null literal to non-nullable reference type.

Check failure on line 817 in src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs

View check run for this annotation

Azure Pipelines / runtime-dev-innerloop (Build linux-x64 debug Libraries_AllConfigurations)

src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs#L817

src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs(817,32): error CS8625: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot convert null literal to non-nullable reference type.

Check failure on line 817 in src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs

View check run for this annotation

Azure Pipelines / dotnet-linker-tests (Build osx-x64 release Runtime_Release)

src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs#L817

src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs(817,32): error CS8625: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot convert null literal to non-nullable reference type.

Check failure on line 817 in src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs

View check run for this annotation

Azure Pipelines / dotnet-linker-tests (Build linux-x64 release Runtime_Release)

src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs#L817

src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs(817,32): error CS8625: (NETCORE_ENGINEERING_TELEMETRY=Build) Cannot convert null literal to non-nullable reference type.
return;
}

Expand Down
Loading