Repository navigation
fix: compile test-fork-locks as C++ under MI_USE_CXX (#619) - #623
Merged
Merged
Conversation
The library is compiled as C++ with MI_USE_CXX=ON, so the MI_DEBUG test
hooks from internal.h are exported with C++ linkage; the test was still
compiled as C and failed to link. Add it to the LANGUAGE CXX list like the
other internal.h-using tests.
Local-Gate: v1 tree=f31954c4603d558eb5ed8253fb93089ebe2c9078 secs=59 lanes=lint:run
Ci-Attestation: {"at":1792798621,"gate":"python/all/lint","host":"linux-x86_64","key":"217f3299a4ee3b2eb60995d8d8a267718740750b7d00f7bfd7de1ba459fa8d06","lane":"lint","parents":["aaef948845f03eecd7e80b29196a4e891bf55444"],"secs":59,"stamp":"9819106f71bf22a4512e74502602d4ad","tree":"f31954c4603d558eb5ed8253fb93089ebe2c9078","v":1,"via":"run"}
zackees
force-pushed
the
fix/619-fork-locks-cxx-link
branch
from
October 23, 2026 23:37
e4b7866 to
628da79
Compare
zackees
added a commit
that referenced
this pull request
Oct 25, 2026
* fix: give the fork-lock test hooks C linkage (#619) 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. * build: regenerate vendor C for #619 extern "C" hooks 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"}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #619.
With
-DMI_USE_CXX=ONthe library sources are compiled as C++, so_mi_test_*_heaps_lock*hooks are exported mangled;test-fork-locks.cwas still compiled as C and failed to link. It is now in the sameLANGUAGE CXXlist as the other tests that includemimalloc/internal.h.Verified locally (Linux gcc, Debug, MI_USE_CXX=ON): builds;
test-fork-locks,-prof-env,-spawn-prof-envpass. Default (C) build unaffected — the change is insideif(MI_USE_CXX).