Skip to content

Commit 986dba1

Browse files
committed
Correct memory safety status docs
1 parent 05d3537 commit 986dba1

3 files changed

Lines changed: 26 additions & 11 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7171
- Extended docs style checking to include `RELEASE.md`.
7272
- Made the docs deploy workflow use the committed `site/package-lock.json` with `npm ci`.
7373
- Switched the docs syntax highlighter from the Oniguruma WASM engine to Shiki's JavaScript regex engine, removing the docs build chunk-size warning.
74+
- Corrected memory-safety documentation so the spec no longer claims unimplemented lifetime, double-free, use-after-free, or bounds-check guarantees.
7475

7576
- **Import handling**
7677
- Local file-based imports now load dependencies during semantic analysis and fail closed on missing or broken modules.

docs/SPEC.md

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -966,12 +966,19 @@ if large == nil {
966966
}
967967
```
968968

969-
### 8.4 Memory Safety Rules
969+
### 8.4 Memory Safety Status
970970

971-
1. **No dangling pointers**: Compiler tracks lifetimes
972-
2. **No double-free**: `del` sets pointer to nil
973-
3. **No use-after-free**: Nil check required after del
974-
4. **Bounds checking**: Array access checked in debug mode
971+
Current implementation:
972+
973+
1. `new` and `del` parse, type-check, and lower for the implemented backends.
974+
2. `del` is validated for reference-like values.
975+
3. `defer del value` can express manual cleanup at scope exit.
976+
977+
Not yet implemented:
978+
979+
1. Ownership, borrowing, or lifetime analysis that proves absence of dangling pointers.
980+
2. Static double-free or use-after-free prevention beyond the current basic shape checks.
981+
3. General array/slice bounds-check insertion by the A7 compiler.
975982

976983
---
977984

@@ -2142,12 +2149,19 @@ if large == nil {
21422149
}
21432150
```
21442151

2145-
### 8.4 Memory Safety Rules
2152+
### 8.4 Memory Safety Status
2153+
2154+
Current implementation:
2155+
2156+
1. `new` and `del` parse, type-check, and lower for the implemented backends.
2157+
2. `del` is validated for reference-like values.
2158+
3. `defer del value` can express manual cleanup at scope exit.
2159+
2160+
Not yet implemented:
21462161

2147-
1. **No dangling pointers**: Compiler tracks lifetimes
2148-
2. **No double-free**: `del` sets pointer to nil
2149-
3. **No use-after-free**: Nil check required after del
2150-
4. **Bounds checking**: Array access checked in debug mode
2162+
1. Ownership, borrowing, or lifetime analysis that proves absence of dangling pointers.
2163+
2. Static double-free or use-after-free prevention beyond the current basic shape checks.
2164+
3. General array/slice bounds-check insertion by the A7 compiler.
21512165

21522166
---
21532167

site/src/pages/Language.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ type_expr :=
490490
Parsing coverage is complete for the language surface described here. The compiler runs tokenization, parsing, semantic passes, preprocessing, and code generation (Zig and C backends) end-to-end.
491491
</DocCallout>
492492
<DocCallout tone="warning">
493-
A small set of semantic features are still open: fall lowering, advanced match diagnostics, generic constraint internals, and lifetime-style memory checks. For exact pass/fail status, see <Link to="/status">Status</Link> and <code className="doc-inline-code">MISSING_FEATURES.md</code>.
493+
A small set of semantic features are still open: fall lowering, advanced match diagnostics, true match capture patterns, and lifetime-style memory checks. For exact pass/fail status, see <Link to="/status">Status</Link> and <code className="doc-inline-code">MISSING_FEATURES.md</code>.
494494
</DocCallout>
495495
</SectionPanel>
496496
</div>

0 commit comments

Comments
 (0)