Skip to content

Memory safety plan#341

Merged
richlander merged 2 commits intomainfrom
memory-safety
Sep 19, 2025
Merged

Memory safety plan#341
richlander merged 2 commits intomainfrom
memory-safety

Conversation

@richlander
Copy link
Copy Markdown
Member

@richlander richlander commented Sep 15, 2025

Rendered markdown

We plan to make memory safety a focus for the next couple releases. This document describes the overall plan and motivation. It references #330, which is an important part of the plan. Memory safety has always been a critical design tenet of C# and .NET. Now is a good time to revisit memory safety design assumptions and product behaviors. We believe we have an opportunity to significantly improve security posture for all .NET developers with this project.

Our plan is significant, however, it is not a breaking change. We plan to make the proposed behaviors opt-in for existing code. Like nullable, new templates may opt users into the new plan, however, those decisions are still months away and not important at this stage.

This plan is the result of a collaboration across language, libraries, runtime, and security design teams. We will be publishing additional design docs as the project progresses. We plan to make the dotnet/runtime repo the key focus for the project. Improvements to the core libraries lift all boats and also enable higher-level libraries and apps to be written with more accurate information on safety, per the design in the caller unsafe spec. We also believe that few other projects have more expansive or stringent requirements as dotnet/runtime.

@richlander richlander changed the title Add memory safety plan Memory safety plan Sep 15, 2025
@richlander richlander merged commit e876928 into main Sep 19, 2025
3 checks passed
@richlander richlander deleted the memory-safety branch September 19, 2025 15:37
@richlander
Copy link
Copy Markdown
Member Author

FYI: dotnet/csharplang#9704

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants