X-Recipient: archive-cygwin@delorie.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@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B9ABD3938C2A
Date: Thu, 08 Jul 2021 14:42:16 +0000
To: Csaba Raduly <rcsaba@gmail.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@mail.gmail.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@cygwin.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
From: Max Mikhanosha via Cygwin <cygwin@cygwin.com>
Reply-To: Max Mikhanosha <max.mikhanosha@protonmail.com>
Cc: "cygwin@cygwin.com" <cygwin@cygwin.com>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cygwin-bounces+archive-cygwin=delorie.com@cygwin.com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie.com@cygwin.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
