Message140891
Py_IS_INFINITY is defined as
#ifndef Py_IS_INFINITY
# if defined HAVE_DECL_ISINF && HAVE_DECL_ISINF == 1
# define Py_IS_INFINITY(X) isinf(X)
# else
# define Py_IS_INFINITY(X) ((X) && \
(Py_FORCE_DOUBLE(X)*0.5 == Py_FORCE_DOUBLE(X)))
# endif
#endif
The test still fails when built --with-pydebug.
(gdb) b isinf
Function "isinf" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (isinf) pending.
(gdb) r
Starting program: /usr/obj/ports/Python-3.2.1/Python-3.2.1/python
Breakpoint 2 at 0x852786d4: file /usr/src/lib/libc/gen/isinf.c, line 27.
Pending breakpoint "isinf" resolved
Python 3.2.1 (default, Jul 22 2011, 17:34:54)
[GCC 4.2.1 20070719 ] on openbsd4
Type "help", "copyright", "credits" or "license" for more information.
>>> int(float('inf'))
0
[56408 refs]
isinf is #defined in math.h to
#define isinf(x) \
((sizeof (x) == sizeof (float)) ? \
__isinff(x) \
: (sizeof (x) == sizeof (double)) ? \
__isinf(x) \
: __isinfl(x))
but setting a bkp on it changes nothing.
Starting program: /usr/obj/ports/Python-3.2.1/Python-3.2.1/python
Breakpoint 2 at 0x89b4f708: file /usr/src/lib/libc/gen/isinf.c, line 36.
Pending breakpoint "__isinff" resolved
Python 3.2.1 (default, Jul 22 2011, 17:34:54)
[GCC 4.2.1 20070719 ] on openbsd4
Type "help", "copyright", "credits" or "license" for more information.
>>> int(float('inf'))
0
Setting a bkp on PyLong_FromDouble() shows that it's not called.
Sorry, this doesnt make sense to me... |
|
Date |
User |
Action |
Args |
2011-07-22 15:47:49 | landry | set | recipients:
+ landry, mark.dickinson, vstinner, rpointel |
2011-07-22 15:47:49 | landry | set | messageid: <1311349669.8.0.460277592039.issue12589@psf.upfronthosting.co.za> |
2011-07-22 15:47:49 | landry | link | issue12589 messages |
2011-07-22 15:47:48 | landry | create | |
|