Closed Kukkimonsuta closed 4 years ago
The ReliabilityContract
attributes could probably be removed without any other changes when targeting a framework that doesn't support them.
I would think CriticalFinalizerObject
already exists since it's the base class of SafeHandle
. However, if it doesn't the use of it in LibGit2Sharp could probably be rewritten using CriticalHandle
instead. This would actually apply to all builds and not just be a special consideration for CoreCLR.
@jkotas can you comment on CERs
CERs were primarily invented for SQL CLR, to ensure that user code cannot leak or otherwise damage the SQL process. The runtime was required to recover from OOM or thread abort in any spot.
We gave up on providing this level of robustness for .NET Core runtime and framework because of it is incredibly expensive to code and test for:
Porting guidance:
try { ... } catch { Environment.FailFast(...); }
.If CERs are frequent problem to deal with for porting large amounts of code, we can consider creating CER compat pack for CoreCLR with dummy implementation.
Thank you for the explanation, I believe there is nothing to add and this issue can be closed.
Split from dotnet/runtime#14419
Are CERs going to be supported or is there viable alternative?
Recorded uses in (3rd party) libraries: