Skip to content

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.


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