public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Eliot Moss <moss@cs.umass.edu>
To: Ken Brown <kbrown@cornell.edu>,
	airplanemath <airplanemath@aol.com>,
	cygwin@cygwin.com
Subject: Re: [QUAR] Re: cpp /usr/include/threads.h fails; modfl segfaults
Date: Sat, 29 Aug 2020 17:41:09 -0400	[thread overview]
Message-ID: <1938e6cc-7921-aeee-7ae2-c8d9c7457656@cs.umass.edu> (raw)
In-Reply-To: <9f819e67-5476-ea48-a13f-f7a4b25d6e69@cornell.edu>

On 8/29/2020 1:57 PM, Ken Brown via Cygwin wrote:

 >> #include <math.h>
 >> #include <stdio.h>
 >> #include <stdlib.h>
 >>
 >> int main(int argc, char *argv[]) {
 >>    long double a, b, c;
 >>    char *num_end = NULL;
 >>    a = b = c = 0.0L;
 >>    if (argc != 2) {
 >>      fprintf(stderr, "Usage: %s NUMBER\n", argv[0]);
 >>      exit(1);
 >>    }
 >>    a = strtold(argv[1], &num_end);
 >>    b = modfl(a, &c);
 >>    printf("%Lf %Lf %Lf\n", a, b, c);
 >>    return 0;
 >> }

I'm using gcc 9.3, and this dies in modfl where it is trying to store the result back.  The -O level 
does not seem to matter.  modfl seems seriously broken.  It comes from winsup in
base cygwin.  I was running 3.1.6-1.  I upgraded to 3.1.7-1 and got the same thing.  This
is the 64-bit cygwin.

The 32-bit version of cygwin 3.1.6-1 processes and runs this just fine.  Same version
of gcc.

It seems the math functions in winsup were not built quite right ...

Regards - Eliot Moss

  reply	other threads:[~2020-08-29 21:41 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <02b16d2e-9d51-de58-807b-3b31b2565b59.ref@aol.com>
2020-08-29 12:52 ` airplanemath
2020-08-29 17:57   ` Ken Brown
2020-08-29 21:41     ` Eliot Moss [this message]
2020-08-30 16:11       ` [QUAR] " Ken Brown
2020-08-30 18:21         ` Eliot Moss
2020-08-30  1:21     ` airplanemath
2020-08-30  2:56       ` Ken Brown
2020-08-30  6:23         ` ASSI
2020-08-30 20:07           ` Brian Inglis
2020-08-30 13:00   ` Corinna Vinschen
2020-08-30 19:21     ` airplanemath
2020-08-31  7:33       ` Corinna Vinschen
2020-08-30 20:39     ` Brian Inglis
2020-08-31  7:35       ` Corinna Vinschen
2020-08-31 15:37         ` Brian Inglis
2020-08-31 18:45           ` Corinna Vinschen
2020-08-31 19:24             ` Brian Inglis
2020-08-31 19:41               ` Corinna Vinschen
2020-09-01 17:28                 ` Brian Inglis
2020-09-02  7:54                   ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1938e6cc-7921-aeee-7ae2-c8d9c7457656@cs.umass.edu \
    --to=moss@cs.umass.edu \
    --cc=airplanemath@aol.com \
    --cc=cygwin@cygwin.com \
    --cc=kbrown@cornell.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).