Skip to content

fix: give the fork-lock test hooks C linkage (#619) - #625

Merged
zackees merged 2 commits into
mainfrom
fix/619-test-hooks-externc
Oct 25, 2026
Merged

zackees merged 2 commits into
mainfrom
fix/619-test-hooks-externc

Conversation

@zackees

@zackees zackees commented Oct 25, 2026

Copy link
Copy Markdown
Owner

Follow-up to #623 (#619). Wraps the four MI_DEBUG heaps-lock test hooks in include/mimalloc/internal.h in extern "C", the same pattern the file already uses for the other test hooks, so test-fork-locks.c links as plain C whether or not the library is compiled as C++. Reverts #623's add-to-LANGUAGE-CXX workaround. Second commit regenerates the vendored amalgamation (rule 2: separate commit).

Verified locally, Linux gcc Debug: MI_USE_CXX=ON and OFF both build fully; test-fork-locks, -prof-env, -spawn-prof-env pass in both.

Wrap the MI_DEBUG heaps-lock test hooks in extern "C", matching the other
test hooks in internal.h, so test-fork-locks.c links as C whether or not the
library is compiled as C++. Reverts #623's compile-test-as-C++ workaround.
Local-Gate: v1 tree=d2a10acfef865c6dfea38201230f9c0368efb86d secs=59 lanes=lint:run
Ci-Attestation: {"at":1792965286,"gate":"python/all/lint","host":"linux-x86_64","key":"ce16a1154e5cad93293e2e09c3e87dae0d737ffe74c64db4967e7d26bc85ea19","lane":"lint","parents":["eea8867618915649c03188db161d45226d37ab5d"],"secs":59,"stamp":"a8b2323b2cfbe651cf265bc41a491760","tree":"d2a10acfef865c6dfea38201230f9c0368efb86d","v":1,"via":"run"}
@zackees
zackees merged commit 6a664cd into main Oct 25, 2026
66 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.

1 participant