Repository navigation
dos.library: new_lock frees the FileLock block if fs_port_addr fails - #200
Merged
Merged
Conversation
alloc_lock_struct() can succeed and then fs_port_addr() fail (e.g. a near-exhausted guest heap on the first lock ever created), propagating the error without freeing the just-allocated block or registering it in self.locks -- orphaning it from the heap's free list for the rest of the run. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
sidick
added a commit
that referenced
this pull request
Oct 23, 2026
Fills in the 0.13 changelog: ixemul.library's full path-based file I/O (GetDeviceProc's dvp_Port, the path packet actions, and Info()) from #197/#198, Supervisor()'s real exception frame unblocking nested library calls from #199, the dl_TimeReq clock() fix from #194, the remaining AllocDosObject types (DOS_STDPKT/DOS_CLI) from #187, and #200's new_lock leak fix. Also documents these in Supported-Libraries.md (expanded packet-action list, Supervisor's RTE-anywhere support, dl_TimeReq). Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found by code review of #197/#198's
dvp_Port/fl_Taskplumbing:new_lockallocates aFileLockwithalloc_lock_struct, then callsfs_port_addrto get the synthetic filesystem port forfl_Task. Iffs_port_addrfails (e.g. the guest heap is too exhausted to also allocate theMsgPort, on the very first lock of a run), the?propagated the error without freeing the already-allocatedFileLockblock or inserting it intoself.locks-- orphaning that memory from the heap's free list for the rest of the run.Fixes it by freeing the block on that error path before returning.
Test plan
cargo test -p volamos-core doslock: 85 pass🤖 Generated with Claude Code