Uh oh!
There was an error while loading. Please reload this page.
gh-144490: Fix mimalloc debug build - #144620
Conversation
kumaraditya303
commented
Feb 9, 2026
Does this issue exists in |
yoney
commented
Feb 9, 2026
It looks like upstream fixed this earlier. The change is semantically the same: they just moved |
vstinner
left a comment
There was a problem hiding this comment.
LGTM. I confirm that test_cppext.TestInteralCAPI pass on Linux with Python built in debug mode.
vstinner
commented
Feb 10, 2026
Note: |
Sorry, @yoney and @vstinner, I could not cleanly backport this to |
vstinner
commented
Feb 10, 2026
Ah, the 3.14 branch is not affected, since the
|
vstinner
commented
Feb 10, 2026
Merged, thanks. |
Fix mimalloc C++ compilation error in debug builds.
The
_mi_assert_faildeclaration usesmi_decl_throw, which expands to__THROW(for__GNUC__). In C,__THROWis__attribute__((__nothrow__))and works anywhere. In C++,__THROWisnoexcept(true), which must come after the parameter list.Before:
After:
This fix also allows removing the
Py_DEBUGguard intest_cppext/extension.cpp, so internal C API headers are now tested in debug builds too.It’s possible this issue was introduced in #122587, though I haven’t verified it
Test:
cc: @vstinner@colesbury@DinoV