public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/16625] New: sin gives wrong result with 2.19 on i386
@ 2014-02-22 14:50 jtaylor.debian at googlemail dot com
  2014-02-22 14:57 ` [Bug libc/16625] " jtaylor.debian at googlemail dot com
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: jtaylor.debian at googlemail dot com @ 2014-02-22 14:50 UTC (permalink / raw)
  To: glibc-bugs

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.


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-06-17 17:33 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-22 14:50 [Bug libc/16625] New: sin gives wrong result with 2.19 on i386 jtaylor.debian at googlemail dot com
2014-02-22 14:57 ` [Bug libc/16625] " jtaylor.debian at googlemail dot com
2014-02-22 16:53 ` adconrad at 0c3 dot net
2014-02-24 14:30 ` schwab@linux-m68k.org
2014-02-24 21:28 ` jtaylor.debian at googlemail dot com
2014-03-04 22:30 ` jtaylor.debian at googlemail dot com
2014-03-04 22:48 ` jtaylor.debian at googlemail dot com
2014-03-04 23:06 ` jtaylor.debian at googlemail dot com
2014-03-05  0:59 ` adconrad at 0c3 dot net
2014-03-09 13:22 ` jtaylor.debian at googlemail dot com
2014-06-13  8:09 ` fweimer at redhat dot com
2014-06-17 17:33 ` jsm28 at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).