Hi, we use mingw-64 to build (cross-compile) Mesa (the OpenGL work-alike) for Windows on Linux. With mingw-w64 versions 5.3.1 and 6.2.0 (at least) bad code is generated in one of the Mesa source files. This leads to semi-random crashes when running OpenGL apps on Windows.
My coworker, Jose, and I have narrowed it down to a Mesa source file that uses variable arguments. A test case is attached. If we compile with -O2 or -O3 the crash occurs (it does not occur with -O0 or -O1). The crash is avoided with -O2 and -O3 if we also specify -fno-omit-frame-pointer.
I haven't yet managed to build mingw-w64 v5.0.1 so I don't know if the bug is still present in that version.
We have a work-around (compile the file in question with -O1) but it would great if this bug could be addressed for the future.
Thanks.
At MSYS2 we are also having issues with native 32bit Mesa (64bit is fine): https://github.com/Alexpux/MINGW-packages/issues/2089
We couldn't find the reason but most likely that's it.
We use mingw-w64 build from git updated much more often than releases and GCC 6.3.0.
GCC 4.9 may be affected as well. I tested old GCC 4.9 builds from here:
https://sourceforge.net/projects/msys2/files/REPOS/MINGW_GCC_4_9/i686/
The oldest - 10.0.0 is not affected, but the newest 10.6.0 is.
What's interestingly different about 10.0.0 is that it was built without LLVM, so it only includes the very slowest softpipe driver.
Any progress with tis issue?
Has there been any progress with this issue?
Has this issue been reported to gcc? (assuming that it's a gcc bug)
Probably fixed: https://github.com/Alexpux/MINGW-packages/issues/2089#issuecomment-361540645
I just tried with i686-w64-mingw32-g++ 6.3.0 that's included with Ubuntu 17.10 and no longer can repro.
I'm not sure if the issue was truly fixed between 6.2.0 and 6.3.0, or is a fluke.
I didn't spot any pertinent bug fix on
https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=6.3