X-Recipient: archive-cygwin AT delorie DOT com X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com 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 AT cs DOT umass DOT edu Subject: Re: [QUAR] Re: cpp /usr/include/threads.h fails; modfl segfaults To: Ken Brown , airplanemath , cygwin AT cygwin DOT com References: <02b16d2e-9d51-de58-807b-3b31b2565b59 DOT ref AT aol DOT com> <02b16d2e-9d51-de58-807b-3b31b2565b59 AT aol DOT com> <9f819e67-5476-ea48-a13f-f7a4b25d6e69 AT cornell DOT 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-Language: en-US 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 AT cygwin DOT 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: , Reply-To: moss AT cs DOT umass DOT edu Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: cygwin-bounces AT cygwin DOT com Sender: "Cygwin" 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 -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple