Bug 217528 - lib/msun/ctrig_test fails with clang 4.0+
Summary: lib/msun/ctrig_test fails with clang 4.0+
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: tests (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: Dimitry Andric
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-04 08:56 UTC by Enji Cooper
Modified: 2021-03-17 10:29 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Enji Cooper freebsd_committer freebsd_triage 2017-03-04 08:56:00 UTC
From https://ci.freebsd.org/job/FreeBSD-head-amd64-test/1915/testReport/junit/lib.msun/ctrig_test/main/ :

Assertion failed: (((void)(ctanhf), fetestexcept((0x04 | 0x20 | 0x01 | 0x08 | 0x10)) == (0))), function test_zero, file /usr/src/lib/msun/tests/ctrig_test.c, line 141.
Process with PID 10738 exited with signal 6 and dumped core; attempting to gather stack trace
(no debugging symbols found)...Core was generated by `/usr/tests/lib/msun/ctrig_test'.
Program terminated with signal 6, Aborted.
#0  0x0000000800b86a5a in thr_kill () from /lib/libc.so.7
#0  0x0000000800b86a5a in thr_kill () from /lib/libc.so.7
#1  0x0000000800b86a24 in __raise (s=6) at /usr/src/lib/libc/gen/raise.c:52
#2  0x0000000800b86999 in abort () at /usr/src/lib/libc/stdlib/abort.c:65
#3  0x0000000800c01e11 in __assert (func=<value optimized out>, 
    file=<value optimized out>, line=<value optimized out>, 
    failedexpr=<value optimized out>) at /usr/src/lib/libc/gen/assert.c:51
#4  0x0000000000405b22 in ?? ()
#5  0x00000000004629e2 in ?? ()
#6  0x000000000040112f in ?? ()
#7  0x0000000800691000 in ?? ()
#8  0x0000000000000000 in ?? ()
GDB exited successfully
Files left in work directory after failure: ctrig_test.core
Comment 1 commit-hook freebsd_committer freebsd_triage 2017-03-04 09:17:38 UTC
A commit references this bug:

Author: ngie
Date: Sat Mar  4 09:16:52 UTC 2017
New revision: 314649
URL: https://svnweb.freebsd.org/changeset/base/314649

Log:
  Convert lib/msun/ctrig_test from TAP to ATF

  This is being done as a precursor for work needed to annontate failing
  testcases with clang 4.0+.

  MFC after:	1 week
  PR:	217528
  Sponsored by:	Dell EMC Isilon

Changes:
  head/lib/msun/tests/Makefile
  head/lib/msun/tests/ctrig_test.c
Comment 2 Enji Cooper freebsd_committer freebsd_triage 2017-03-04 12:08:15 UTC
:test_zero_input is the testcase that's failing:
https://ci.freebsd.org/job/FreeBSD-head-amd64-test/1946/testReport/junit/lib.msun/ctrig_test/test_zero_input/ .
Comment 3 commit-hook freebsd_committer freebsd_triage 2017-03-09 06:59:53 UTC
A commit references this bug:

Author: ngie
Date: Thu Mar  9 06:58:47 UTC 2017
New revision: 314951
URL: https://svnweb.freebsd.org/changeset/base/314951

Log:
  Expect :test_zero_input to fail on amd64

  The clang 4.x+ upgrade now causes this testcase to fail, but
  only on amd64.

  More investigation will be done to determine the cause.

  MFC after:	1 week
  Reported by:	Jenkins
  PR:		217528
  Sponsored by:	Dell EMC Isilon

Changes:
  head/lib/msun/tests/ctrig_test.c
Comment 4 commit-hook freebsd_committer freebsd_triage 2017-03-12 04:40:17 UTC
A commit references this bug:

Author: ngie
Date: Sun Mar 12 04:40:02 UTC 2017
New revision: 315118
URL: https://svnweb.freebsd.org/changeset/base/315118

Log:
  MFC r305283,r314649:

  r305283:

  Skip :test_large on i386

  More assertions are failing on ^/head now.

  PR:	205446

  r314649:

  Convert lib/msun/ctrig_test from TAP to ATF

  This is being done as a precursor for work needed to annontate failing
  testcases with clang 4.0+.

  PR:	217528

Changes:
_U  stable/11/
  stable/11/lib/msun/tests/Makefile
  stable/11/lib/msun/tests/ctrig_test.c
Comment 5 commit-hook freebsd_committer freebsd_triage 2017-03-16 02:10:50 UTC
A commit references this bug:

Author: ngie
Date: Thu Mar 16 02:09:51 UTC 2017
New revision: 315359
URL: https://svnweb.freebsd.org/changeset/base/315359

Log:
  MFC r314951:

  Expect :test_zero_input to fail on amd64

  The clang 4.x+ upgrade now causes this testcase to fail, but
  only on amd64.

  More investigation will be done to determine the cause.

  PR:		217528

Changes:
_U  stable/11/
  stable/11/lib/msun/tests/ctrig_test.c
Comment 6 Enji Cooper freebsd_committer freebsd_triage 2017-11-05 20:05:45 UTC
This should be dim's bug.
Comment 7 commit-hook freebsd_committer freebsd_triage 2021-02-15 22:56:59 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=a7b42c4b7f7ad7bd1b22ab57ed9185bdcea6f0a2

commit a7b42c4b7f7ad7bd1b22ab57ed9185bdcea6f0a2
Author:     Alex Richardson <arichardson@FreeBSD.org>
AuthorDate: 2021-02-15 22:06:41 +0000
Commit:     Alex Richardson <arichardson@FreeBSD.org>
CommitDate: 2021-02-15 22:55:12 +0000

    msun: ctanh/ctanhf: Import fix from musl libc

    This applies musl commit b02eed9c4841913d690a2d0029737d72615384fe by
    Szabolcs Nagy and updates the tests accordingly. This also allows
    removing an XFAIL from the test.

    musl commit message:

    complex: fix ctanh(+-0+i*nan) and ctanh(+-0+-i*inf)

    These cases were incorrect in C11 as described by
    http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1886.htm

    PR: 217528

    Reviewed By:    dim
    MFC after:      1 week
    Differential Revision: https://reviews.freebsd.org/D28578

 lib/msun/src/s_ctanh.c      |  8 +++++---
 lib/msun/src/s_ctanhf.c     |  2 +-
 lib/msun/tests/ctrig_test.c | 23 ++++++++---------------
 3 files changed, 14 insertions(+), 19 deletions(-)
Comment 8 commit-hook freebsd_committer freebsd_triage 2021-03-17 10:29:50 UTC
A commit in branch stable/13 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=8d42552e7b29eed31ec6b28d091d8c9b99d824fc

commit 8d42552e7b29eed31ec6b28d091d8c9b99d824fc
Author:     Alex Richardson <arichardson@FreeBSD.org>
AuthorDate: 2021-02-15 22:06:41 +0000
Commit:     Alex Richardson <arichardson@FreeBSD.org>
CommitDate: 2021-03-17 09:44:16 +0000

    msun: ctanh/ctanhf: Import fix from musl libc

    This applies musl commit b02eed9c4841913d690a2d0029737d72615384fe by
    Szabolcs Nagy and updates the tests accordingly. This also allows
    removing an XFAIL from the test.

    musl commit message:

    complex: fix ctanh(+-0+i*nan) and ctanh(+-0+-i*inf)

    These cases were incorrect in C11 as described by
    http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1886.htm

    PR: 217528

    Reviewed By:    dim
    MFC after:      1 week
    Differential Revision: https://reviews.freebsd.org/D28578

    (cherry picked from commit a7b42c4b7f7ad7bd1b22ab57ed9185bdcea6f0a2)

 lib/msun/src/s_ctanh.c      |  8 +++++---
 lib/msun/src/s_ctanhf.c     |  2 +-
 lib/msun/tests/ctrig_test.c | 23 ++++++++---------------
 3 files changed, 14 insertions(+), 19 deletions(-)