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

Fix identifying Mono vs CoreCLR runtimes #79

Merged
merged 1 commit into from
Jul 7, 2023

Conversation

omajid
Copy link
Member

@omajid omajid commented Jul 7, 2023

We currently use mono-gc.h as signal that the runtime is a mono-based runtime. Unfortuatnely, that file is only included with 7.0. This makes us mis-identify Mono-based 6.0 runtimes as CoreCLR-based instead.

Instead, use libcoreclrtraceptprovider.so which is available CoreCLR-based platforms (eg, x86_64) but not Mono-based ones. This file exists on 6.0 and later:

$ find /usr/lib64/dotnet -iname libcoreclrtraceptprovider.so
/usr/lib64/dotnet/shared/Microsoft.NETCore.App/8.0.0-preview.5.23280.8/libcoreclrtraceptprovider.so
/usr/lib64/dotnet/shared/Microsoft.NETCore.App/7.0.7/libcoreclrtraceptprovider.so
/usr/lib64/dotnet/shared/Microsoft.NETCore.App/6.0.18/libcoreclrtraceptprovider.so

We currently use `mono-gc.h` as signal that the runtime is a mono-based
runtime. Unfortuatnely, that file is only included with 7.0. This makes
us mis-identify Mono-based 6.0 runtimes as CoreCLR-based instead.

Instead, use libcoreclrtraceptprovider.so which is available
CoreCLR-based platforms (eg, x86_64) but not Mono-based ones. This file
exists on 6.0 and later:

    $ find /usr/lib64/dotnet -iname libcoreclrtraceptprovider.so
    /usr/lib64/dotnet/shared/Microsoft.NETCore.App/8.0.0-preview.5.23280.8/libcoreclrtraceptprovider.so
    /usr/lib64/dotnet/shared/Microsoft.NETCore.App/7.0.7/libcoreclrtraceptprovider.so
    /usr/lib64/dotnet/shared/Microsoft.NETCore.App/6.0.18/libcoreclrtraceptprovider.so
@omajid omajid merged commit dda0049 into redhat-developer:main Jul 7, 2023
18 of 28 checks passed
@omajid
Copy link
Member Author

omajid commented Jul 7, 2023

@tmds

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant