Created attachment 1560743 [details] Preprocessed source Description of problem: Segfault while compiling pcsx2 gcc segfaults while compiling pcsx2 (git version 56a976e277a4a05622bd6396d8ee9049b62049cd) The command line is: g++ -m32 -DGSdx_EXPORTS -DWXUSINGDLL -D_ARCH_32=1 -D_FILE_OFFSET_BITS=64 -D_M_X86=1 -D_M_X86_32=1 -D__WXGTK__ -I/usr/include/SDL2 -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/atk-1.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/gtk-3.0 -I/usr/include/libxml2 -I../common/include -I../common/include/Utilities -I../common/include/x86emitter -Icommon/include -Iplugins/GSdx -I../plugins/GSdx/. -isystem /usr/lib/wx/include/gtk3-unicode-3.0 -isystem /usr/include/wx-3.0 -mfxsr -mxsave -march=native -pipe -fvisibility=hidden -pthread -fno-builtin-strcmp -fno-builtin-memcmp -mfpmath=sse -Wall -Wextra -Wno-attributes -Wno-unused-function -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-value -Wstrict-aliasing -Wstrict-overflow=1 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -DNDEBUG -O -std=c++11 -Wno-invalid-offsetof -pthread -fno-operator-names -Wno-unknown-pragmas -Wno-parentheses -Wunused-variable -Wno-class-memaccess -Wno-packed-not-aligned -MD -MT plugins/GSdx/CMakeFiles/GSdx.dir/Renderers/SW/GSRendererSW.cpp.o -MF plugins/GSdx/CMakeFiles/GSdx.dir/Renderers/SW/GSRendererSW.cpp.o.d -o plugins/GSdx/CMakeFiles/GSdx.dir/Renderers/SW/GSRendererSW.cpp.o -c ../plugins/GSdx/Renderers/SW/GSRendererSW.cpp Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. Try to compile the file 2. The system segfaults 3. Actual results: Segfault Expected results: The file compiles (I did not have problems with the compiler of f29) Additional info: I include the preprocessed file;
Why are the sources using fastcall attribute? Especially using templates on function types with that attribute makes no sense at all on Linux.
Honestly, I have no idea about the reason for the fastcall attribute. I shall open a bug report upstream. In any case, if I disable the attribute where it is used, then the compilation ends without problems and also the program appears to run. The code is x86-32 and not x86-64 None the less, it is weird that the compiler fails with a segmentation fault.
Incidentally, if I remove the __fastcall attribute, then the relevant code path fails (it is a software fallback for when there is no hw rasterizer)...
gcc-9.1.1-1.fc30 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-007851f216
gcc-9.1.1-1.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-007851f216
I confirm that gcc-9.1.1-1.fc30 from updates-testing seems to fix the problem (the code compiles without segfaulting the compiler and also it appears to work properly).
gcc-9.1.1-1.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.