This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author skrah
Recipients David.Edelsohn, cstratak, fweimer, mark.dickinson, skrah, vstinner
Date 2019-01-17.14:59:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1547737152.49.0.2227065151.issue35752@roundup.psfhosted.org>
In-reply-to
Content
Okay, so it's not a severe bug. That leaves us with the question
what to do about it. As I said above, other call sites could be
affected, too:

_struct.c:

static int
np_float(char *p, PyObject *v, const formatdef *f)
{
    float x = (float)PyFloat_AsDouble(v);
    if (x == -1 && PyErr_Occurred()) {
        PyErr_SetString(StructError,
                        "required argument is not a float");
        return -1;
    }
    memcpy(p, (char *)&x, sizeof x);
    return 0;
}


Even if this one isn't (I can't test) I think I'd prefer a more
global fix for the affected gcc version. Does any switch like
-fno-inline or something else work? If so, we could detect the
issue in configure.ac.
History
Date User Action Args
2019-01-17 14:59:13skrahsetrecipients: + skrah, mark.dickinson, vstinner, fweimer, David.Edelsohn, cstratak
2019-01-17 14:59:12skrahsetmessageid: <1547737152.49.0.2227065151.issue35752@roundup.psfhosted.org>
2019-01-17 14:59:12skrahlinkissue35752 messages
2019-01-17 14:59:12skrahcreate