summaryrefslogtreecommitdiff
path: root/Programs
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-03-05 23:31:54 +0100
committerGitHub <noreply@github.com>2019-03-05 23:31:54 +0100
commita9df651eb4c18a07ec309df190419613e95cba7b (patch)
tree8c014426433938a9c94e7555b20eb13d78369cfa /Programs
parentd8b3a98c9098c66a714fd5593e1928af0ffbc631 (diff)
downloadcpython-git-a9df651eb4c18a07ec309df190419613e95cba7b.tar.gz
bpo-36142: Add _PyMem_GetDebugAllocatorsName() (GH-12185)
The development mode now uses the effective name of the debug memory allocator ("pymalloc_debug" or "malloc_debug"). So the name doesn't change after setting the memory allocator.
Diffstat (limited to 'Programs')
-rw-r--r--Programs/_testembed.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Programs/_testembed.c b/Programs/_testembed.c
index 70bf96036a..170672e443 100644
--- a/Programs/_testembed.c
+++ b/Programs/_testembed.c
@@ -139,6 +139,9 @@ static int test_forced_io_encoding(void)
static int test_pre_initialization_api(void)
{
+ /* the test doesn't support custom memory allocators */
+ putenv("PYTHONMALLOC=");
+
/* Leading "./" ensures getpath.c can still find the standard library */
_Py_EMBED_PREINIT_CHECK("Checking Py_DecodeLocale\n");
wchar_t *program = Py_DecodeLocale("./spam", NULL);
@@ -235,6 +238,9 @@ static void bpo20891_thread(void *lockp)
static int test_bpo20891(void)
{
+ /* the test doesn't support custom memory allocators */
+ putenv("PYTHONMALLOC=");
+
/* bpo-20891: Calling PyGILState_Ensure in a non-Python thread before
calling PyEval_InitThreads() must not crash. PyGILState_Ensure() must
call PyEval_InitThreads() for us in this case. */