-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Enable CoreCLR init failure logging in single exe host #80104
Enable CoreCLR init failure logging in single exe host #80104
Conversation
When adding the CoreCLR initialization failure logging recently, I have missed the fact that there are two versions of the coreclr_resolver.cpp. One for standalone host that I have added support for, but also for linking into single exe. This change adds the missing support to the single exe host.
Tagging subscribers to this area: @vitek-karas, @agocke, @VSadov Issue DetailsWhen adding the CoreCLR initialization failure logging recently, I have missed the fact that there are two versions of the coreclr_resolver.cpp. One for standalone host that I have added support for, but also for linking into single exe. This change adds the missing support to the single exe host.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good - I would only remove the unnecessary typedef.
@@ -8,6 +8,8 @@ | |||
#include <pal.h> | |||
#include <trace.h> | |||
|
|||
typedef void (*coreclr_error_writer_callback_fn) (const char *message); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is necessary - the same typedef already exists in coreclr_resolver.h
which is included.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed in the last commit.
The CI failure is a known issue unrelated to this change. |
Port of dotnet#78484, dotnet#78790, dotnet#80104 and dotnet#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.
Port of dotnet#78484, dotnet#78790, dotnet#80104 and dotnet#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.
When adding the CoreCLR initialization failure logging recently, I have missed the fact that there are two versions of the coreclr_resolver.cpp. One for standalone host that I have added support for, but also for linking into single exe.
This change adds the missing support to the single exe host.