Skip to content

Harden native render lifecycle - #16

Merged
dixpac merged 1 commit into
mainfrom
fix/harden_lifecycle_locality
Aug 18, 2026
Merged

Harden native render lifecycle#16
dixpac merged 1 commit into
mainfrom
fix/harden_lifecycle_locality

Conversation

@dixpac

@dixpac dixpac commented Aug 18, 2026

Copy link
Copy Markdown
Member

Copy and freeze Ruby string inputs before releasing the GVL so concurrent mutation cannot invalidate pointers used by Plutobook. Reject embedded NUL bytes where Ruby and C string semantics would otherwise diverge.

Own each successfully created book through rb_ensure so callback errors and asynchronous interruptions always destroy native resources. Keep Ruby values alive through their final native use and cover mutation, interruption, and NUL-byte behavior in tests.

Copy and freeze Ruby string inputs before releasing the GVL so concurrent mutation cannot invalidate pointers used by Plutobook. Reject embedded NUL bytes where Ruby and C string semantics would otherwise diverge.

Own each successfully created book through rb_ensure so callback errors and asynchronous interruptions always destroy native resources. Keep Ruby values alive through their final native use and cover mutation, interruption, and NUL-byte behavior in tests.
@dixpac
dixpac merged commit 39b7c21 into main Aug 18, 2026
11 checks passed
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