Skip to content

Commit 227c04f

Browse files
committed
Better _ZSt15get_new_handlerv fix
1 parent 9380115 commit 227c04f

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

‎Include/internal/pycore_mimalloc.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414

1515
#ifdef WITH_MIMALLOC
1616
# define MI_NO_PTHREAD_ATFORK 1
17+
// CPython never uses mimalloc's C++ operator new APIs, so don't define a weak
18+
// std::get_new_handler() (_ZSt15get_new_handlerv) in libpython.
19+
# define MI_NO_CXX_NEW_HANDLER 1
1720
# ifdef MS_WINDOWS
1821
// Initialize from a CRT initializer and use FLS for thread cleanup instead
1922
// of TLS callbacks, which run during DLL attach before the CRT is set up.

‎Tools/build/smelly.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# mimalloc doesn't use static, but it's symbols are not exported
2121
# from the shared library. They do show up in the static library
2222
# before its linked into an executable.
23-
ALLOWED_STATIC_PREFIXES = ('mi_', '_mi_', '__mi', '_ZSt')
23+
ALLOWED_STATIC_PREFIXES = ('mi_', '_mi_', '__mi')
2424

2525
# "Legacy": some old symbols are prefixed by "PY_".
2626
EXCEPTIONS = frozenset({

0 commit comments

Comments
 (0)