Skip to content

Comments

Fix nil pointer dereference when using ctx.allocator in init#26

Merged
meszmate merged 1 commit intomainfrom
fix/25-nil-pointer-dereference-when-trying-to-use-init-ctxallocator
Feb 18, 2026
Merged

Fix nil pointer dereference when using ctx.allocator in init#26
meszmate merged 1 commit intomainfrom
fix/25-nil-pointer-dereference-when-trying-to-use-init-ctxallocator

Conversation

@meszmate
Copy link
Owner

  • Defer arena allocator binding until after self is moved to its final location, fixing a dangling pointer when ctx.allocator was used in model.init()
  • Reset frame allocator before calling model.init() so ctx.allocator works correctly from the start
  • Extract resetFrameAllocator() helper to avoid duplicating arena reset logic
  • Add allocator stability test and document allocator lifetimes in README

@meszmate meszmate linked an issue Feb 18, 2026 that may be closed by this pull request
@meszmate meszmate merged commit d630b2f into main Feb 18, 2026
9 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.

Nil Pointer Dereference when trying to use init ctx.allocator.

1 participant