delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2024/10/13/11:28:03

DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 49DFS3Wa2952736
Authentication-Results: delorie.com;
dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=FvS5yEet
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2DE7D385AE59
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1728833281;
bh=8cHO5zYGNBYzchJbqzJ57NmGJ3E5PP/ganxDpJ/JKCA=;
h=To:Subject:Date:References:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=FvS5yEetpn2kO0yhIoLynya//hCI6W9Zdfh4NmQ+kIVOUcG2bqqPFLZdCYC3LoAmK
o9s6QegRvKBqr9L6oR3KjdBEU7MMwpirg+FapUsdZCESmW/aP7Y1HG09vBqvzB3ge3
0WPnDLPd4x1ba16sVQ8Uux4WTMlizNxlGHzxEf7U=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E20EF3856DF3
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E20EF3856DF3
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1728833259; cv=none;
b=fK8XBFNK3dn2QoNul5tOpV9zVL/FK4qEjlsHE7L67dRSwAT0OHr64iwpnXx2qqocWaSQGZ/0jcoVDDqxHWyNexM9udd7gwy2wm22C7iP4F5pddKvTMjupshG45HJ1n/dR6UwJT8ajCh38z02Y0yr2qqrjce8UQ1SSKIA55A+5Zs=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1728833259; c=relaxed/simple;
bh=8iKYM3ZhHwqmxOmzXCgOGCv2mcbV1ebLYTajWq6IUJY=;
h=To:From:Subject:Date:Message-ID:Mime-Version;
b=gFFHw9hp+UvwH7va4prujiRnM+4RfI2caUYiANeQ66TUo8zaSHLPLzyQk8ozeXg5LvyRuHmdiUJ+/OY9gSc3N6tGwnYfiYmrIodB1Ol5b+JeTCfm3J7lAhMRWfmiG6/4vt3kcIMaR4uhCiViYH70C8CmM9Wzv5S10wWCNBxUzkI=
ARC-Authentication-Results: i=1; server2.sourceware.org
X-Injected-Via-Gmane: http://gmane.org/
To: cygwin AT cygwin DOT com
Subject: Re: cygwin 3.5.4-1: signal handling destroys 'long double' values
Date: Mon, 14 Oct 2024 00:27:25 +0900
Message-ID: <d2d2c7b2-1c01-452f-b23b-eeb6eaac9ddf@gmail.com>
References: <922a6d7e-3ee1-9bb7-dfd7-b94c53a7b9d4 AT t-online DOT de>
Mime-Version: 1.0
User-Agent: Thunderbird Daily
X-No-Archive: Yes
In-Reply-To: <922a6d7e-3ee1-9bb7-dfd7-b94c53a7b9d4@t-online.de>
X-Spam-Status: No, score=1.1 required=5.0 tests=BAYES_00, BODY_8BITS,
DKIM_ADSP_CUSTOM_MED, FORGED_GMAIL_RCVD, FREEMAIL_FORGED_FROMDOMAIN,
FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS,
NML_ADSP_CUSTOM_MED, SPF_HELO_NONE, SPF_PASS,
TXREP autolearn=no autolearn_force=no version=3.4.6
X-Spam-Level: *
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: jojelino via Cygwin <cygwin AT cygwin DOT com>
Reply-To: jojelino <jojelino AT gmail DOT com>
Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 49DFS3Wa2952736

On 10/7/2024 10:11 PM, Christian Franke via Cygwin wrote:
> $ cat sigtest.c
> #include <signal.h>
> #include <stdio.h>
> 
> static volatile sig_atomic_t sigcnt;
> 
> static void sigint_handler(int sig)
> {
>    (void)sig;
>    sigcnt++;
> }
> 
> #ifndef WORKS
> typedef long double float_type;
> #define FMT "La"
> #else
> typedef double float_type;
> #define FMT "a"
> #endif
> 
> int main()
> {
>    signal(SIGINT, sigint_handler);
>    volatile float_type x = 0x1.23456789p+0;
>    while (sigcnt < 42) {
>      volatile float_type y = x;
>      volatile float_type d = y - x;
>      if (d != 0.0)
>        printf("x = %" FMT ", y = %" FMT ", d = %" FMT "\n", x, y, d);
>    }
> }
> 
> $ gcc -o sigtest -O2 sigtest.c
> 
> $ ./sigtest > out.txt
> (press ^C 42x 🙂

Reproduced same as you did.

I have a installed memory in DIMMs of laptop that is not in a list of 
supported memory of DDR4. although result of dmidecode on smbios is said 
that maximum of 64GB is allowed. So memory read error is commonplace in 
heavy load.

I suggest you to try below command line as I don't experience it anymore.

Please try it out.

$ sed -E '25a usleep(100000);' sigtest.c|gcc -x c -O2 -msse3 
-mfpmath=sse -;./a.exe
<stdin>: In function ‘main’:
<stdin>:26:1: warning: implicit declaration of function ‘usleep’ 
[-Wimplicit-function-declaration]
(press ^C 42x 🙂

$ ^C



-- 
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019