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 <rep...@bugs.python.org>
<http://bugs.python.org/issue23503>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to