Skip to content

HOTFIX free after simplify bool, call munmap after each request #4115

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 7 commits into from
Jul 2, 2025

Conversation

jberthold
Copy link
Member

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.

@@ -154,11 +159,24 @@ void kore_symbol_add_formal_argument(kore_symbol *, kore_sort const *);

void kllvm_init(void);
void kllvm_free_all_memory(void);
void reset_munmap_all_arenas(void);
Copy link
Member Author

Choose a reason for hiding this comment

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

This is the important function, the rest is just aligning the header file contents with the upstream version.

@jberthold jberthold marked this pull request as ready for review July 2, 2025 08:43
@jberthold
Copy link
Member Author

Going to merge this as-is and adjust to the released API later when the llvm-backend build/release has gone through CI successfully

@jberthold jberthold merged commit a135276 into master Jul 2, 2025
6 checks passed
@jberthold jberthold deleted the HOTFIX-free-after-simplify-bool branch July 2, 2025 23:11
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.

3 participants