fstream::open crashes if first file it ever opening is in /proc

Max Mikhanosha max.mikhanosha@protonmail.com
Thu Jul 8 14:42:16 GMT 2021


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


More information about the Cygwin mailing list