-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Exit with quick_exit when using debug UCRT #109006
base: main
Are you sure you want to change the base?
Conversation
I expect that this will break tracing tests. Tracing depends on C runtime shutdown notification to close the session:
Also, the same fundamental problem exists in regular coreclr as well. |
It seems that the only way to fix the problem and keep the cleanup at exit untouched would be to link to ucrt dynamically. The cleanup then occurs in DllMain of the library on DLL_PROCESS_DETACH. |
I meant the low level CRT cleanup, not the atexit stuff. |
Ah, damn, that's C++ and not in ucrt, so that would not help. |
There is no C++ in the mix. Neither
|
/azp run runtime-nativeaot-outerloop |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run runtime-nativeaot-outerloop |
Azure Pipelines successfully started running 1 pipeline(s). |
It looks like we do not have any diagnostics tests that would be sensitive for improperly closed eventpipe sessions. I think we should also update #109006 (comment) to register the callbacks using Looks good to me otherwise. |
Why don't we do it currently? |
We do not dynamically link to debug CRT to save us from troubles with deploying it to CI machines. We do dynamically link to release CRT (ie the shipping bits link to release CRT). |
Thanks, I remember trying to link some static libraries with dynamic CRT linkage and getting errors related to static/dynamic CRT mismatch. But that was years ago and I will try it again. |
Resolves #108640.
Cc @dotnet/ilc-contrib @janvorli