| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Does this issue exists in mimalloc upstream as well? |
Sorry, something went wrong.
It looks like upstream fixed this earlier. The change is semantically the same: they just moved mi_attr_noexcept to the end. However, the naming differs, our code uses mi_decl_throw, while upstream uses mi_attr_noexcept. |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM. I confirm that test_cppext.TestInteralCAPI pass on Linux with Python built in debug mode.
Sorry, something went wrong.
|
Note: test_cppext.TestInteralCAPI fails on Windows with Python built in release mode if I remove # if !defined(MS_WINDOWS) in Lib/test/test_cppext/extension.cpp. The change is correct: we should continue skipping the two pycore includes on Windows. |
Sorry, something went wrong.
|
Sorry, @yoney and @vstinner, I could not cleanly backport this to 3.14 due to a conflict. cherry_picker 73fa6be2fe6c4a17d91413e12ab6af8376767211 3.14 |
Sorry, something went wrong.
|
Ah, the 3.14 branch is not affected, since the _mi_assert_fail() declaration doesn't use mi_decl_throw: void _mi_assert_fail(const char* assertion, const char* fname, unsigned int line, const char* func ); |
Sorry, something went wrong.
|
Merged, thanks. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Fix mimalloc C++ compilation error in debug builds.
The _mi_assert_fail declaration uses mi_decl_throw, which expands to __THROW (for __GNUC__ ). In C, __THROW is __attribute__((__nothrow__)) and works anywhere. In C++, __THROW is noexcept(true), which must come after the parameter list.
Before:
After:
This fix also allows removing the Py_DEBUG guard in test_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