Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replay allocators #52

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Replay allocators #52

wants to merge 2 commits into from

Conversation

mjp41
Copy link
Member

@mjp41 mjp41 commented Sep 25, 2024

Add an extra option to the heap to allow for deterministic reallocation of memory.

To detect certain ABA issues, we require memory to be reallocated quickly. In Asan this is not the case, as it delays reallocation to improve the chances of catching use-after-free bugs.

This takes advantage of the refactoring in #51 to enable an alternative heap implementation that is integrated with systematic testing to allow objects to be reused.

This will address #50.

[Note initially contains the changes for #51, but will be removed once that lands on main.]

@mjp41 mjp41 force-pushed the replay_allocators branch 2 times, most recently from acabef1 to 7ee9d21 Compare September 25, 2024 19:47
Allow for us to more easily change the PRNG representation.

At startup run the PRNG a few times to reduce initial correlation in bottom bits.  Ultimately, we should update the PRNG to something better.
Asan delays reallocation to increase the likelyhood of catching a UAF.  This adds a simple free list allocator
that tries to reuse allocations quickly to increase the chance of an ABA problem being detected.
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