Author vstinner
Recipients lemburg, mark.dickinson, stutzbach, vstinner
Date 2019-07-01.17:39:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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__

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:

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:04vstinnersetrecipients: + vstinner, lemburg, mark.dickinson, stutzbach
2019-07-01 17:39:03vstinnersetmessageid: <>
2019-07-01 17:39:03vstinnerlinkissue37474 messages
2019-07-01 17:39:03vstinnercreate