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

In closure_free(), use the FSM allocator instead of free(). #489

Merged
merged 1 commit into from
Aug 23, 2024

Conversation

sw17ch
Copy link
Contributor

@sw17ch sw17ch commented Aug 23, 2024

closure_free() should use the free implementation provided by the FSM's allocator.

While attempting to make bindings to the libfsm API for a Rust project, I came across a case where my allocator was giving me the same pointer twice. I added instrumentation that places guard regions on either side of the allocation, and with this, I was able to observe closure_free() attempting to free the internal pointer between the guards rather than the pointer to the start of the allocation.

With this change in place, I was able to run my test program to completion.

@katef
Copy link
Owner

katef commented Aug 23, 2024

Thanks!

@katef katef merged commit 98fe88b into katef:main Aug 23, 2024
173 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.

2 participants