delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2021/07/08/10:43:33

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 09D16398D04D
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1625755412;
bh=29SeU10v6IKkSpZlirNqWvTtEvG5CZvcNb+617OnXXg=;
h=Date:To:Subject:In-Reply-To:References:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
From;
b=BPmeWU7UPIAEwCLsZYsPChk96UCvh7vIs9jbzD9prQ7PNrDAkAktqzXgDq2TKY/R5
E1sHi052gfAz73natunRRCy6eP06P6jwadSIaFxioa02frGSuQFI+J4xrqpqnL7/JV
5As3iH5Y2EdlXUCGfKm+6RCDRigsv3GBuHfjPRe0=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B9ABD3938C2A
Date: Thu, 08 Jul 2021 14:42:16 +0000
To: Csaba Raduly <rcsaba AT gmail DOT com>
Subject: Re: fstream::open crashes if first file it ever opening is in /proc
Message-ID: <FfbhZGigqHIpq4JPGdb3L42_R3B6m7Fp3RxYnM-Yqi5eR71SyBM4kVMB7VqO2uvqO6IOFk9lWVWgEYMWtiz_-q6N27S8HWLsBEy-Lc6jir0=@protonmail.com>
In-Reply-To: <CAEhDDbDJgjuEJ19Mi245mjFwewN+vT_bc6xJiKTJ5zJ2=O1=bw@mail.gmail.com>
References: <_022Gh93RaZBX0JIf3f3UuZ7mekqKNi9g4ap-KHKpAa_ppq6O8Y3WXBDUUCw6yK6KJCdfhrFhwGfbB-UZD5R0wmWa2Lo6ZE6glWt4JzyDns=@protonmail.com>
<CAEhDDbDJgjuEJ19Mi245mjFwewN+vT_bc6xJiKTJ5zJ2=O1=bw AT mail DOT gmail DOT com>
MIME-Version: 1.0
X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_MSPIKE_H4,
RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS,
TXREP autolearn=ham autolearn_force=no version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
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: Max Mikhanosha via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Max Mikhanosha <max DOT mikhanosha AT protonmail DOT com>
Cc: "cygwin AT cygwin DOT com" <cygwin AT cygwin 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>

You have same versions of cygwin1.dll and libstdc++ dll?

Wonder if it has something to do with machine, its 64 core amd threadripper box, (128 logical cpu's with hyperthreading

Some other observations:

1) Compiling the test program on other box with older Cygwin, where problem does not happen, and copying the .exe, still reproduces

2) With older cygwin problem goes away (I did not reinstall older cygwin, but moved just made a directory with older cygwin1.dll and two other DLL's and the executable and set path to it)

3) if I use fopen() problem also reproduces, but only if I include <iostream>.  The difference between executable that includes <iostream> vs one that does not, is that the one including <iostream> links cygstdc++.6.dll and cyggcc_s-seh-1.dll but one without does not

So problem I'm having is related to some static initialization code thats triggered by presence of cygstdc++.6.dll, likely in the area of ios_base::sync_with_stdio logic.

For now I'll just let this go and workaround by adding dummy fstream("whatever") on top of my main program, if there is a real bug I'm sure other people will hit it too sooner or later

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