[issue12589] test_long.test_nan_inf() failed on OpenBSD (powerpc)
STINNER Victor
report at bugs.python.org
Fri Jul 22 18:04:26 CEST 2011
STINNER Victor <victor.stinner at haypocalc.com> added the comment:
I'm not sure that your version of gdb understands macros. You may have to set a breakpoint on __isinf. Compile Python with "-g -ggdb" helps gdb.
Py_IS_INFINITY is may not defined as "# define Py_IS_INFINITY(X) isinf(X)". To check that, add #error macro in pymath.h for all cases around #ifndef Py_IS_INFINITY. For example:
#ifndef Py_IS_INFINITY
# if defined HAVE_DECL_ISINF && HAVE_DECL_ISINF == 1
# error "Py_IS_INFINITY is implemented using isinf()"
# define Py_IS_INFINITY(X) isinf(X)
# else
# error "Py_IS_INFINITY is implemented using *0.5"
# define Py_IS_INFINITY(X) ((X) && \
(Py_FORCE_DOUBLE(X)*0.5 == Py_FORCE_DOUBLE(X)))
# endif
#else
# error "Py_IS_INFINITY already set!?"
#endif
And recompile Python. It may be a typo in pyconfig.h (generated by configure) or an issue with the inclusion paths of gcc (-I options).
Can you please attach your pyconfig.h and /usr/include/math.h files?
Can you also copy-paste the line used to compile Object/floatobject.c (to check the compiler options)? Use touch Object/floatobject.c && make to recompile this file.
FYI, isinf() is also a macro on Linux:
# ifdef __NO_LONG_DOUBLE_MATH
# define isinf(x) \
(sizeof (x) == sizeof (float) ? __isinff (x) : __isinf (x))
# else
# define isinf(x) \
(sizeof (x) == sizeof (float) \
? __isinff (x) \
: sizeof (x) == sizeof (double) \
? __isinf (x) : __isinfl (x))
# endif
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12589>
_______________________________________
More information about the Python-bugs-list
mailing list