Skip to content

zkalloc fix: safe arena routing#215

Open
TomWambsgans wants to merge 2 commits intomainfrom
fix_zkalloc
Open

zkalloc fix: safe arena routing#215
TomWambsgans wants to merge 2 commits intomainfrom
fix_zkalloc

Conversation

@TomWambsgans
Copy link
Copy Markdown
Collaborator

(size-routing + sticky-System realloc) (mirors Barnadrot/zk-alloc#9)

(replaces the "flush_rayon" ugly fix)

Barnadrot/zk-alloc#9)

(replaces the "flush_rayon" ugly fix)

Co-authored-by: Barnadrot <kbarna.drot@gmail.com>
)

- realloc: switch copy_nonoverlapping -> copy. When a Vec grows inside the
  arena, the freshly-bumped destination can overlap the source within the
  same slab, violating copy_nonoverlapping's precondition (UB).
- begin_phase: panic if a phase is already active. Phases must stay flat
  in a bump allocator: a nested begin would recycle the slab and overwrite
  the outer phase's still-live data. Rather than refcounting (per PR #10),
  we make the violation impossible via an  assert.

Co-authored-by: Barnadrot <kbarna.drot@gmail.com>
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