From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailsrv.cs.umass.edu (mailsrv.cs.umass.edu [128.119.240.136]) by sourceware.org (Postfix) with ESMTPS id CB3AD3857C53 for ; Sat, 29 Aug 2020 21:41:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org CB3AD3857C53 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=cs.umass.edu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=moss@cs.umass.edu Received: from [192.168.0.16] (c-24-62-203-86.hsd1.ma.comcast.net [24.62.203.86]) by mailsrv.cs.umass.edu (Postfix) with ESMTPSA id 241F8401DC94; Sat, 29 Aug 2020 17:41:09 -0400 (EDT) Reply-To: moss@cs.umass.edu Subject: Re: [QUAR] Re: cpp /usr/include/threads.h fails; modfl segfaults To: Ken Brown , airplanemath , cygwin@cygwin.com References: <02b16d2e-9d51-de58-807b-3b31b2565b59.ref@aol.com> <02b16d2e-9d51-de58-807b-3b31b2565b59@aol.com> <9f819e67-5476-ea48-a13f-f7a4b25d6e69@cornell.edu> From: Eliot Moss Message-ID: <1938e6cc-7921-aeee-7ae2-c8d9c7457656@cs.umass.edu> Date: Sat, 29 Aug 2020 17:41:09 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <9f819e67-5476-ea48-a13f-f7a4b25d6e69@cornell.edu> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, NICE_REPLY_A, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: cygwin@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Aug 2020 21:41:10 -0000 On 8/29/2020 1:57 PM, Ken Brown via Cygwin wrote: >> #include >> #include >> #include >> >> 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