Message333878
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. |
|
Date |
User |
Action |
Args |
2019-01-17 14:59:13 | skrah | set | recipients:
+ skrah, mark.dickinson, vstinner, fweimer, David.Edelsohn, cstratak |
2019-01-17 14:59:12 | skrah | set | messageid: <1547737152.49.0.2227065151.issue35752@roundup.psfhosted.org> |
2019-01-17 14:59:12 | skrah | link | issue35752 messages |
2019-01-17 14:59:12 | skrah | create | |
|