- Commit 1
- Reverts commit f954c6bb80, which reverted PR https://github.com/dotnet/runtime/pull/1457 due to issues
- Commit 2
- Fixes crashes and assertion failures seen by the original change, fixes https://github.com/dotnet/runtime/issues/29934
- The crashes were caused by commit https://github.com/dotnet/runtime/pull/1457/commits/6aa3c7083735895c2e687a77e3636080edb366c3 in the original PR
- Call counting infos cannot be deleted when the corresponding call counting stubs may still run, because:
- The remaining call count decremented by the stub is in the call counting info
- The only way to get a code version / method desc from a stub is to go through the call counting info
- Got one repro of the assertion failure in https://github.com/dotnet/runtime/issues/22786 and it is most likely caused by the same issue, following heap corruption from modifying a deleted call counting info where the memory is reused for a `NativeCodeVersionNode`, messing up the method desc pointer
- Fixed with a partial revert of the above commit. Added back the `Complete` stage and then call counting infos are deleted only after it's ensured that call counting stubs won't be used (shortly before deleting them).
- Commit 3
- Public static functions of `CallCountingManager` that may be called through the debugger may occur before static initialization, added a check for null as suggested in https://github.com/dotnet/runtime/pull/29892
Documents Index
This repo includes several documents that explain both high-level and low-level concepts about the .NET runtime and libraries. These are very useful for contributors, to get context that can be very difficult to acquire from just reading code.
Intro to .NET
.NET is a self-contained .NET runtime and framework that implements ECMA 335. It can be (and has been) ported to multiple architectures and platforms. It support a variety of installation options, having no specific deployment requirements itself.
Getting Started
Workflow (Building, testing, etc.)
If you want to contribute a code change to this repo, start here.
Design Docs
The Book of the Runtime is a set of chapters that go in depth into various interesting aspects of the design of the .NET Framework.
For your convenience, here are a few quick links to popular chapters:
For additional information, see this list of blog posts that provide a 'deep-dive' into the CoreCLR source code
Coding Guidelines
- CLR Coding Guide
- CLR JIT Coding Conventions
- Cross Platform Performance and Eventing Design
- Adding New Events to the VM
- C# coding style
- Framework Design Guidelines
- Cross-Platform Guidelines
- Performance Guidelines
- Interop Guidelines
- Breaking Changes
- Breaking Change Definitions
- Breaking Change Rules
- Project Guidelines
- Adding APIs Guidelines
- Legal Native calls
Project Docs
To be added. Visit the project docs folder directly meanwhile.