public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Max Mikhanosha <max.mikhanosha@protonmail.com>
To: Csaba Raduly <rcsaba@gmail.com>
Cc: "cygwin@cygwin.com" <cygwin@cygwin.com>
Subject: Re: fstream::open crashes if first file it ever opening is in /proc
Date: Thu, 08 Jul 2021 14:42:16 +0000	[thread overview]
Message-ID: <FfbhZGigqHIpq4JPGdb3L42_R3B6m7Fp3RxYnM-Yqi5eR71SyBM4kVMB7VqO2uvqO6IOFk9lWVWgEYMWtiz_-q6N27S8HWLsBEy-Lc6jir0=@protonmail.com> (raw)
In-Reply-To: <CAEhDDbDJgjuEJ19Mi245mjFwewN+vT_bc6xJiKTJ5zJ2=O1=bw@mail.gmail.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

  reply	other threads:[~2021-07-08 14:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-08  5:41 Max Mikhanosha
2021-07-08  8:53 ` Csaba Raduly
2021-07-08 14:42   ` Max Mikhanosha [this message]
2021-07-09  9:08     ` Csaba Raduly

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='FfbhZGigqHIpq4JPGdb3L42_R3B6m7Fp3RxYnM-Yqi5eR71SyBM4kVMB7VqO2uvqO6IOFk9lWVWgEYMWtiz_-q6N27S8HWLsBEy-Lc6jir0=@protonmail.com' \
    --to=max.mikhanosha@protonmail.com \
    --cc=cygwin@cygwin.com \
    --cc=rcsaba@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).