Skip to content

u3: refactors spin-stack for safety and robustness#1038

Merged
pkova merged 9 commits into
developfrom
jb/spin-safe
Jul 3, 2026
Merged

u3: refactors spin-stack for safety and robustness#1038
pkova merged 9 commits into
developfrom
jb/spin-safe

Conversation

@joemfb

@joemfb joemfb commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

This PR refactors the spin-stack writer (mars, bytecode-interpreter) and reader (urth, http driver) for safety and robustness. Overflow/underflow conditions are checked, inconsistencies in stack-restoration on error are removed, and data races between reader and writer are resolved (by adding atomic-guarded write-operation counters and detecting/retrying writes impacting reads). A memory leak in the http server is plugged, and the relevant fixes from #1029 are recapitulated.

A couple things that are not included but may be worth pursuing: the shared memory namespace still uses PIDs and is therefore liable to collision in certain cloud/containerization scenarios (could be resolved with higher-entropy names), and stack-entry lengths are still 4 bytes (where 2 would suffice).

@joemfb joemfb requested a review from a team as a code owner June 17, 2026 19:11
@pkova pkova merged commit 4383af1 into develop Jul 3, 2026
1 check passed
@pkova pkova deleted the jb/spin-safe branch July 3, 2026 16:01
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.

2 participants