Skip to content

Fix GC interfaces versioning - #81188

Merged
janvorli merged 2 commits into
dotnet:mainfrom
janvorli:fix-gc-interfaces-versioning
Jan 26, 2023
Merged

Fix GC interfaces versioning#81188
janvorli merged 2 commits into
dotnet:mainfrom
janvorli:fix-gc-interfaces-versioning

Conversation

@janvorli

Copy link
Copy Markdown
Member

The change that introduced GC interfaces versioning had a bug preventing it from using .NET 8 GC being used with .NET 7 runtime. The GC_VersionInfo return value should have been the minimum supported version, not the current one. But more importantly there was also some confusion on what interface the GC_INTERFACE_MAJOR_VERSION represents. While the change considered it to be a version of the IGCToCLR interface, it really means the version of the IGCHeap interface. This change creates a separate version, EE_INTERFACE_MAJOR_VERSION for versioning o the IGCToCLR interface to rectify that.
@Maoni0 also didn't like the way of creating a new version of IGCToCLR interface for each major version change, so I am changing it to single IGCToCLR interface.

The change that introduced GC interfaces versioning had a bug preventing
it from using .NET 8 GC being used with .NET 7 runtime. The
GC_VersionInfo return value should have been the minimum supported
version, not the current one. But more importantly there was also
some confusion on what interface the GC_INTERFACE_MAJOR_VERSION
represents. While the change considered it to be a version of the
IGCToCLR interface, it really means the version of the IGCHeap
interface. This change creates a separate version,
EE_INTERFACE_MAJOR_VERSION for versioning o the IGCToCLR interface to
rectify that.
@Maoni0 also didn't like the way of creating a new version of
IGCToCLR interface for each major version change, so I am changing it to
single IGCToCLR interface.
@janvorlijanvorli added this to the 8.0.0 milestone Jan 25, 2023
@janvorli
janvorli requested a review from Maoni0January 25, 2023 20:59
@janvorlijanvorli self-assigned this Jan 25, 2023
@ghost

Copy link
Copy Markdown

Tagging subscribers to this area: @dotnet/gc
See info in area-owners.md if you want to be subscribed.

Issue Details

The change that introduced GC interfaces versioning had a bug preventing it from using .NET 8 GC being used with .NET 7 runtime. The GC_VersionInfo return value should have been the minimum supported version, not the current one. But more importantly there was also some confusion on what interface the GC_INTERFACE_MAJOR_VERSION represents. While the change considered it to be a version of the IGCToCLR interface, it really means the version of the IGCHeap interface. This change creates a separate version, EE_INTERFACE_MAJOR_VERSION for versioning o the IGCToCLR interface to rectify that.
@Maoni0 also didn't like the way of creating a new version of IGCToCLR interface for each major version change, so I am changing it to single IGCToCLR interface.

Author:janvorli
Assignees:janvorli
Labels:

area-GC-coreclr

Milestone:8.0.0

Comment threadsrc/coreclr/gc/gcenv.ee.standalone.inl Outdated

@Maoni0Maoni0 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@janvorli
janvorli merged commit daeb683 into dotnet:mainJan 26, 2023
@janvorli
janvorli deleted the fix-gc-interfaces-versioning branch January 26, 2023 09:34
janvorli added a commit to janvorli/runtime that referenced this pull request Jan 26, 2023
* Fix GC interfaces versioning
The change that introduced GC interfaces versioning had a bug preventing
it from using .NET 8 GC being used with .NET 7 runtime. The
GC_VersionInfo return value should have been the minimum supported
version, not the current one. But more importantly there was also
some confusion on what interface the GC_INTERFACE_MAJOR_VERSION
represents. While the change considered it to be a version of the
IGCToCLR interface, it really means the version of the IGCHeap
interface. This change creates a separate version,
EE_INTERFACE_MAJOR_VERSION for versioning o the IGCToCLR interface to
rectify that.
@Maoni0 also didn't like the way of creating a new version of
IGCToCLR interface for each major version change, so I am changing it to
single IGCToCLR interface.
carlossanlop pushed a commit that referenced this pull request Feb 8, 2023
* [Release/7.0] CoreCLR initialization failures logging
Port of #78484, #78790, #80104 and #80294
This change adds detecting and logging of failures during coreclr
initialization. For logging, it uses a new host API
`coreclr_set_error_writer` to register a callback to report the errors
to the host. The hosts have support for optional usage of this API so
that they can work with older runtime versions as well.
The logging checks and reports failures with:
* System.Private.CoreLib.dll
* GC initialization
* JIT initialization
* libSystem.Native.so/dylib on Unix
The logging messages should allow customers to self-diagnose the issues
causing the failures.
This change also adds backport of support for standalone GC back compatibility that
is a prerequisite for it.
* Fix GC interfaces versioning (#81188)
* Fix GC interfaces versioning
The change that introduced GC interfaces versioning had a bug preventing
it from using .NET 8 GC being used with .NET 7 runtime. The
GC_VersionInfo return value should have been the minimum supported
version, not the current one. But more importantly there was also
some confusion on what interface the GC_INTERFACE_MAJOR_VERSION
represents. While the change considered it to be a version of the
IGCToCLR interface, it really means the version of the IGCHeap
interface. This change creates a separate version,
EE_INTERFACE_MAJOR_VERSION for versioning o the IGCToCLR interface to
rectify that.
@Maoni0 also didn't like the way of creating a new version of
IGCToCLR interface for each major version change, so I am changing it to
single IGCToCLR interface.
@ghostghost locked as resolved and limited conversation to collaborators Feb 25, 2023
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@janvorli@Maoni0