This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/16625] New: sin gives wrong result with 2.19 on i386
- From: "jtaylor.debian at googlemail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Sat, 22 Feb 2014 14:50:48 +0000
- Subject: [Bug libc/16625] New: sin gives wrong result with 2.19 on i386
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=16625
Bug ID: 16625
Summary: sin gives wrong result with 2.19 on i386
Product: glibc
Version: 2.19
Status: NEW
Severity: normal
Priority: P2
Component: libc
Assignee: unassigned at sourceware dot org
Reporter: jtaylor.debian at googlemail dot com
CC: drepper.fsp at gmail dot com
in ubuntu 14.04 i386 with glibc2.19 we are seeing wrong results for calls to
sin that don't appear with 2.18:
https://launchpadlibrarian.net/167193519/buildlog_ubuntu-trusty-i386.python-cffi_0.8.1-1ubuntu3_FAILEDTOBUILD.txt.gz
> assert library.sin(12.3) == math.sin(12.3)
E assert 0.8444952930965295 == -0.26323179136580094
I failed to create a testcase for as it seems to depend on global state.
to reproduce via the packages in 14.04 o
apt-get source python-cffi
cd python-cffi*
apt-get build-dep python-cffi
gdb --args python2.7 -m pytest testing/test_function.py
testing/test_zdistutils.py
from what I can tell with my limited assembly skills is that it computes the
right result but clobbers it in libc_feresetround_387_ctx
0xf7da2028 in libc_feresetround_387_ctx (ctx=0xffffa0a0) at
../sysdeps/i386/fpu/fenv_private.h:452
452 if (__glibc_unlikely (ctx->updated_status))
3: $st2 = 0.26251239976915330398554715429781936
2: $st1 = 7.2970669792260636173761756580191662e-08
1: $st0 = 0.84449529309652948683151407749392092
$st2 contains the right result, but its not returned to $st0 after the function
returns so cffi gets the wrong result.
--
You are receiving this mail because:
You are on the CC list for the bug.