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.
Created on 2011年12月05日 23:24 by dmalcolm, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (5) | |||
|---|---|---|---|
| msg148893 - (view) | Author: Dave Malcolm (dmalcolm) (Python committer) | Date: 2011年12月05日 23:24 | |
On ppc64, on this box, with glibc-2.14.90-19.ppc64, test_cmath fails with: ====================================================================== FAIL: test_specific_values (test.test_cmath.CMathTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Python-2.7.2/Lib/test/test_cmath.py", line 352, in test_specific_values msg=error_message) File "/builddir/build/BUILD/Python-2.7.2/Lib/test/test_cmath.py", line 112, in rAssertAlmostEqual '{!r} and {!r} are not sufficiently close'.format(a, b)) AssertionError: acos0200: acos(complex(1.620686051868302e+308, 1.0308426226285283e+308)) Expected: complex(0.5665082609382622, -710.5420687424156) Received: complex(0.5665082609382622, -inf) Received value insufficiently close to expected value. It turns out (after much debugging) that libm in this version of glibc has an architecture-specific implementation of hypot(3) which returns inf in many of the test cases in tests/cmath_testcases.txt, when the non-architecture-specific implementation returns large finite values. See downstream bug in Fedora's bug tracker: https://bugzilla.redhat.com/show_bug.cgi?id=750811 for more details. Seen with the Python 2.7.2 tarball, but the code doesn't appear to have changed in hg in either the default or the 2.7 branches. I will also file a bug in glibc's bug tracker about this. |
|||
| msg148894 - (view) | Author: Dave Malcolm (dmalcolm) (Python committer) | Date: 2011年12月05日 23:37 | |
Reported in glibc's bug tracker as: http://sourceware.org/bugzilla/show_bug.cgi?id=13472 |
|||
| msg148934 - (view) | Author: Dave Malcolm (dmalcolm) (Python committer) | Date: 2011年12月06日 19:56 | |
The glibc bug has been fixed in that project's git repo: http://repo.or.cz/w/glibc.git/commit/850fb039cec802072f70ed9763927881bbbf639c |
|||
| msg148936 - (view) | Author: Mark Dickinson (mark.dickinson) * (Python committer) | Date: 2011年12月06日 20:08 | |
Thanks for the report, and all the sleuthing. It's always good to see Python's test suite expose C library (or C compiler) bugs. :-) I propose closing this as 'won't fix': I certainly wouldn't want to add workarounds in the cmath source (though in theory that would be possible). I don't really think it's worth adding special cases to the test-suite, either. What do you think? |
|||
| msg148979 - (view) | Author: Dave Malcolm (dmalcolm) (Python committer) | Date: 2011年12月07日 17:27 | |
I agree. I filed this here in case anyone else ran into it, but given that this is really a glibc bug (now fixed), I'm closing this out as "won't fix". |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:24 | admin | set | github: 57743 |
| 2011年12月07日 17:27:23 | dmalcolm | set | status: open -> closed resolution: wont fix messages: + msg148979 |
| 2011年12月06日 20:09:49 | mark.dickinson | set | assignee: mark.dickinson |
| 2011年12月06日 20:08:49 | mark.dickinson | set | messages: + msg148936 |
| 2011年12月06日 19:56:24 | dmalcolm | set | messages:
+ msg148934 title: test_cmath fails on ppc with glibc-2.14.90 due to optimized architecture-specific "hypot" -> test_cmath fails on ppc with glibc-2.14.90 due to buggy architecture-specific "hypot" |
| 2011年12月06日 19:54:34 | mark.dickinson | set | versions: - Python 3.4 |
| 2011年12月06日 19:42:23 | mark.dickinson | set | nosy:
+ mark.dickinson |
| 2011年12月05日 23:37:37 | dmalcolm | set | messages: + msg148894 |
| 2011年12月05日 23:24:20 | dmalcolm | create | |