You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d26d5af
Browse filesBrowse the repository at this point in the historyBrowse files
flow: a Region that ends while a handle that allocates in it is still open is an error (region-ended-under-handle): the handle's state and the data its ops made would dangle; a shut handle (in an end state it reached by an op) does not count; neg tests handle_row_end, handle_row_end_state
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,8 @@ Every change to srs that lands, newest first. A project that builds with srs (sn
4
4
5
5
## Unreleased
6
6
7
+
- flow: a Region that ends (an op into an end state) while a handle that allocates in it is still open is an error (`error[region-ended-under-handle]`); before, the handle's next op wrote into or read freed memory. A handle already shut by an op does not count.
8
+
7
9
- types: a handler fn takes its op's parameter types: each value param after `self` must have the op's declared type (`error[mismatch]` at the fn); before, only the count was checked, so a handler body read its op's arguments under types of its own choosing.
8
10
9
11
- arena: a program past 32 MiB gets huge pages without handling `Srs.Pages`: the Arena arms the gate itself at its second reservation, so a small program pays nothing and a large one faults once per 2 MiB (snx on a NixOS system: 881k -> 356k page faults, system time 5.3 -> 3.0 s; a 64 MB list program: 15.7k -> 8.0k faults).
S2c.diag(fs, "entry-facts-unsolvable", l, "entry facts with no solution in", S2c.Name(n), "make the entry facts satisfiable")
481
481
case Flow.Dead(l, n) =>
482
482
S2c.diag(fs, "use-after-free", l, "use of a value after its region ended:", S2c.Name(n), "use it before the region ends, or allocate it in a longer region")
483
+
case Flow.RowEnd(l, n) =>
484
+
S2c.diag(fs, "region-ended-under-handle", l, "the region ends while a handle that allocates in it is still open:", S2c.Name(n), "end the handle's block first, or open the handle in a region that outlives it")
483
485
case Flow.Escape(l, n) =>
484
486
S2c.diag(fs, "region-escape", l, "a value escapes the scope of its region", S2c.Name(n), "allocate it in a region that outlives the block")
0 commit comments