Skip to content

Exporting reset_munmap_all_arenas to C and Python Bindings #1210

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

Merged
merged 2 commits into from
Jul 2, 2025

Conversation

Robertorosmaninho
Copy link
Collaborator

@Robertorosmaninho Robertorosmaninho commented Jul 2, 2025

WIP

@Robertorosmaninho Robertorosmaninho self-assigned this Jul 2, 2025
@rv-jenkins rv-jenkins changed the base branch from master to develop July 2, 2025 00:37
Comment on lines +434 to +436
void kllvm_reset_munmap_all_arenas(void) {
reset_munmap_all_arenas();
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will also need this in the header file, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, sorry!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've just pushed this fix, thanks for spotting it!

@Robertorosmaninho Robertorosmaninho marked this pull request as ready for review July 2, 2025 14:30
@Robertorosmaninho Robertorosmaninho merged commit 10a5322 into develop Jul 2, 2025
10 checks passed
@Robertorosmaninho Robertorosmaninho deleted the expose_reset_munmap_all_arenas branch July 2, 2025 14:30
jberthold added a commit to runtimeverification/haskell-backend that referenced this pull request Jul 2, 2025
Fixes a problem that surfaced in the `kontrol` upgrade (symptom: server
crashes unexpectedly after some iterations).
The LLVM backend was changed to not call `munmap` within
`free_all_kore_mem` any more, which makes the `mmap` calls to initialise
thread-local heap address space fail after a number of requests.

This is a hot-fix which calls `reset_munmap_all_arenas`, a function not
currently included in the LLVM backend C API.
The function will be included in the API once
runtimeverification/llvm-backend#1210 is merged,
then the header file and the function name should be aligned with the
API again.

The backend is _not going to work with older LLVM backends_ because [the
function that needs to be called is new as of June
7](runtimeverification/llvm-backend@facee2b).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants