dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.16k stars 4.71k forks source link

Support for CERs #14424

Closed Kukkimonsuta closed 4 years ago

Kukkimonsuta commented 9 years ago

Split from dotnet/runtime#14419

Are CERs going to be supported or is there viable alternative?

Recorded uses in (3rd party) libraries:

sharwell commented 9 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.

joshfree commented 9 years ago

@jkotas can you comment on CERs

jkotas commented 9 years ago

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:

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.

Kukkimonsuta commented 9 years ago

Thank you for the explanation, I believe there is nothing to add and this issue can be closed.