Skip to content

Preserve native locked-thread list ownership - #995

Open
OskarEichler wants to merge 1 commit into
deivid-rodriguez:mainfrom
OskarEichler:codex/lock-list-ownership
Open

OskarEichler wants to merge 1 commit into
deivid-rodriguez:mainfrom
OskarEichler:codex/lock-list-ownership

Conversation

@OskarEichler

Copy link
Copy Markdown

Summary:

  • include the tail node when checking locked-thread membership
  • move locked_tail when removing the final node through its predecessor

Why:
Membership iteration stops before locked_tail, so re-adding the tail thread inserts a duplicate. Removing a tail through the middle-list path also leaves locked_tail pointing to freed memory. Subsequent additions can write through stale native state.

Verification:

  • focused native model covers duplicate tail insertion plus tail removal/replacement
  • current composite suite remains at upstream baseline: 522 runs, 770 assertions, 13 known Ruby 4 layout failures, 0 errors, 2 skips
  • native extension/gem build and syntax checks pass

Compatibility:
Lock ordering and public thread behavior are unchanged; the internal singly-linked list now maintains its membership and tail invariants.

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.

1 participant