Repository navigation
Define memory-safety models and evidence - #5226
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Round 1 review of
The locked head is superseded. The replacement will keep the scope |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Round 1 replacement review of
The locked replacement head is superseded. These documentation corrections |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Round 1 replacement review of
The locked replacement head is superseded. These remain documentation-only |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Round 1 replacement review of
The locked replacement head is superseded. The corrections remain within the |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Round 1 replacement review of
The locked head is superseded. The clean review does not transfer to the |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Round 1 replacement review of
The locked head is superseded. Both reviewers will inspect the replacement |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Scope recovery completed by user direction: split into focused successors. The broad head was superseded. Replacement head
Owner-internal findings are preserved in #5252, #5253, #5254, #5255, #5256, Round 1 restarts on the focused replacement head; no review result from the |
Round 4 replacement 2\n\nSuperseded head:
|
|
Round 4 is review-clean at |
Round 5 start\n\nCandidate head:
|
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Round 5 replacement\n\nSuperseded head:
|
Round 5 supporting-contract replacement\n\nCandidate head remains
|
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Round 5 replacement 2\n\nSuperseded head:
|
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Round 5 replacement 3\n\nSuperseded head:
|
|
Round 5 is review-clean at |
|
Production-host adoption path for the Metadata API-fact successor #5253: 3 stages. (1) #5253 publishes version-aware caller contracts, independent signature-pointer facts, module layout/rules, and conventional backing-storage evidence in the shared API models. (2) #5257 adopts those facts in the shared CSharp declaration producer, with #5255 supplying its separately owned primary-constructor fallback. (3) #5257 exercises that producer through both CLI and browser/Wasm declaration surfaces. #5253 completes stage 1 only and leaves current IsUnsafe behavior unchanged. JS-export policy #5258 and Research summaries #5259 remain independent adoption branches. Retirement/narrowing of IsUnsafe follows explicit consumer migration rather than silently changing its meaning in the producer. |
|
Counted production-host adoption path for the declaration-spelling slice: (1) Metadata facts, including the focused layout prerequisite #6144; (2) shared CSharp declaration spelling and unchanged-product-output compiler evidence in #6105 under #5257; (3) CLI and browser/Wasm declaration/source enablement through the shared producer. Total: three stages. #6144 supplies typed evidence independently; it does not enable C# layout replay or either host. The CSharp WIP remains parked until that prerequisite lands. |
The focused memory-safety composition design distinguishes the legacy v1 model
from the currently recognized v2 binary marker and defines how project policy,
binary contracts, method-body evidence, and provenance compose.
The PR owns only vocabulary, evidence-plane boundaries, and typed handoffs.
Implementation findings discovered during review were split into focused
owner issues: #5252, #5253, #5254, #5255, #5256, #5257, #5258, #5259,
#5260, #5262, and #5270.
The claims are grounded in the public .NET Blog overview and pinned
dotnet/designs,dotnet/roslyn,dotnet/csharplang, anddotnet/runtimesources. The blog supplies explanatory adoption context rather than normative
compiler semantics. Egor Bogatov's dotnet/runtime#131002 migration analyzers
and dotnet/runtime#131484 source-audit work are treated as external audit
models, not a dotnet-inspect evidence plane or binary/IL-body proof.
The v2 auditing scenario explicitly requires a completeness-qualified census
of inner-unsafe methods, identification of safe boundaries as the highest
burden unsafe users, and bounded caller/callee paths in both directions across
assemblies. #5270 owns that focused
DotnetInspector.ResearchQueriescomposition over the existing Analysis and call-graph substrates.
Decompiler reconstruction now has an explicit runtime oracle: use
unsafe(expr)when one expression can be isolated, otherwise use the smallestdependency-correct block and keep semantically safe statements outside. This is
synthesized placement because IL cannot recover the original block/expression
choice. #5255 and #2021 own the focused implementation and compile-back gate.
Demo
An actual .NET 11 Preview 7 throwaway class library containing only
public sealed class C { }, built with updated enforcement andAllowUnsafeBlocks=false, produces these memory-safety rows:The design's composed-report mockup keeps project policy, binary facts, and
project-to-binary provenance separate, including an explicit
Unverifiedprovenance row.
Validation
npx markdownlint-cli docs/design/memory-safety-models.md docs/design/memory-safety-modes.md docs/overview.md docs/README.mdgit diff --check origin/main...HEAD