Message347048
Just after calling _PyRuntime_Initialize(), Py_Main() calls:
/* 754 requires that FP exceptions run in "no stop" mode by default,
* and until C vendors implement C99's ways to control FP exceptions,
* Python requires non-stop mode. Alas, some platforms enable FP
* exceptions by default. Here we disable them.
*/
#ifdef __FreeBSD__
fedisableexcept(FE_OVERFLOW);
#endif
It's done before calling Py_Initialize(). So applications embedding Python don't call it. But "customized Python" which call the new Py_RunMain() with Py_InititializeFromConfig() will not call it neither.
I would like to know if this setup code should be moved into Py_Initialize()? Especially into the new PyConfig API:
https://docs.python.org/dev/c-api/init_config.html
PyConfig got 2 flags to control parameters which affect the whole process:
* configure_c_stdio
* configure_locale
What is the behavior on FreeBSD when fedisableexcept(FE_OVERFLOW) is not called?
Note: I'm not sure why this call is only needed on FreeBSD, but not on macOS, OpenBSD or NetBSD (operating systems close to FreeBSD). |
|
Date |
User |
Action |
Args |
2019-07-01 17:39:04 | vstinner | set | recipients:
+ vstinner, lemburg, mark.dickinson, stutzbach |
2019-07-01 17:39:03 | vstinner | set | messageid: <1562002743.95.0.49076601863.issue37474@roundup.psfhosted.org> |
2019-07-01 17:39:03 | vstinner | link | issue37474 messages |
2019-07-01 17:39:03 | vstinner | create | |
|