Summary: | sin gives wrong result with 2.19 on i386 | ||
---|---|---|---|
Product: | glibc | Reporter: | Julian Taylor <jtaylor.debian> |
Component: | libc | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | CC: | adconrad, doko, drepper.fsp, jsm28 |
Priority: | P2 | Flags: | fweimer:
security-
|
Version: | 2.19 | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: |
Description
Julian Taylor
2014-02-22 14:50:48 UTC
hm no $st2 does not contain the right result but its related to the rounding context retval in ../sysdeps/ieee754/dbl-64/s_sin.c:391 does contain the result, after that it jumps to the rounding context after which the result is wrong. some better debugging instructions for cffi: gdb --args python2.7 -m pytest testing/test_function.py testing/test_zdistutils.py break sin # calls sin 8 times with before it x=1.23 reaches the problematic case of x=12.3 ignore 1 8 I'm unable to reproduce that. Compiler bug? possible, I just rebuilt the packaged libc with -Og instead of -O2 and the issue disappears... the compiler I use is is 4.8.2-16ubuntu2 20140221 (r208010) from the gcc-4_8-branch. I have bisected the issue to this commit: commit 392dd2de03c054b1b32358561570be14f55e9ae9 Author: Siddhesh Poyarekar <siddhesh@redhat.com> Date: Fri Dec 20 16:01:03 2013 +0530 Consolidate code to compute sin and cos from lookup tables but building the commit with gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-11ubuntu1) fixes it again, really does smell like a compiler bug gcc-4.9 (Ubuntu 4.9-20140303-0ubuntu3) 4.9.0 20140304 (experimental) [trunk revision 208299] works too, so its just 4.8.2 thats broken r204212 of gcc fixes it http://gcc.gnu.org/ml/gcc-patches/2013-10/msg02422.html though it seems like an accidental fix be removing the -fregmove pass building with gcc 4.8.2 and -fno-regmove fixes the issue too. Resolved as a compiler bug, not a glibc bug. |