Skip to content

Exporting reset_munmap_all_arenas to C and Python Bindings#1210

Merged
Robertorosmaninho merged 2 commits into
developfrom
expose_reset_munmap_all_arenas
Jul 2, 2025
Merged

Exporting reset_munmap_all_arenas to C and Python Bindings#1210
Robertorosmaninho merged 2 commits into
developfrom
expose_reset_munmap_all_arenas

Conversation

@Robertorosmaninho

@Robertorosmaninho Robertorosmaninho commented Jul 2, 2025

Copy link
Copy Markdown
Collaborator

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 thread bindings/c/lib.cpp
Comment on lines +434 to +436
void kllvm_reset_munmap_all_arenas(void) {
reset_munmap_all_arenas();
}

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
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
Copy Markdown
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