[issue3167] math test fails on Solaris 10

Skip Montanaro report at bugs.python.org
Wed Jul 9 04:46:00 CEST 2008


Skip Montanaro <skip at pobox.com> added the comment:

Regarding -lieee, I don't see an ieee library on my system.

Regarding -ffast-math, while it changes the log function which is linked 
to, it doesn't appear to modify the result of math.log:

% ldd build/lib.solaris-2.10-i86pc-2.6/math.so 
        libm.so.2 =>     /lib/libm.so.2
        libgcc_s.so.1 =>         /opt/app/nonc++/lib/libgcc_s.so.1
        libc.so.1 =>     /lib/libc.so.1
% gdb ./python
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show 
copying"
and "show warranty" for details.
This GDB was configured as "i386-pc-solaris2.10"...
(gdb) b math_1
Function "math_1" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y

Breakpoint 1 (math_1) pending.
(gdb) r
Starting program: /home/tuba/skipm/src/python-svn/trunk/build/python 
Python 2.6b1+ (trunk:64812M, Jul  8 2008, 21:40:26) 
[GCC 4.2.2] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
im>>> import math
>>> inf = float('inf')
>>> math.log(-inf)

Breakpoint 1, math_1 (arg=0x81f19bc, func=0xfee2d6a0 <log>, 
can_overflow=0)
    at /home/tuba/skipm/src/python-svn/trunk/Modules/mathmodule.c:171
171     {
(gdb) func
Undefined command: "func".  Try "help".
(gdb) p func
$1 = (double (*)(double)) 0xfee2d6a0 <log>
(gdb) n
173             x = PyFloat_AsDouble(arg);
(gdb) n
174             if (x == -1.0 && PyErr_Occurred())
(gdb) p x
$2 = -inf
(gdb) n
176             errno = 0;
(gdb) n
178             r = (*func)(x);
(gdb) n
186             else if (Py_IS_INFINITY(r)) {
(gdb) p r
$3 = -inf

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3167>
_______________________________________


More information about the Python-bugs-list mailing list