STINNER Victor added the comment:

> As a result, this initializer causes this file to be undefined.

Hum, in practice I'm not aware of any crash on any platform. Python is tested 
on various compilers (GCC, Clang, ICC, Microsoft Visual Studio, etc.), various 
operating systems (Mac OS X, Linux, Windows, FreeBSD, OpenBSD, Solaris, etc.), 
various architectures (x86, x86-64, PPC, etc.).

The memory allocator is probably the first instruction when starting Python.

Anyway, do you see a way to avoid the undefined behaviour?

Python has a _PyMem_SetupAllocators() function called very early in main() 
(before the first Python memory allocation), but calling this function is 
optional. So we have to prepare everything during the compilation.


Python tracker <>
Python-bugs-list mailing list

Reply via email to