SIGSEGV with GCC 5.0
#1
PCSX 2 builds without errors but launching ends with SIGSEGV. After launching version built by GCC 5.0 there isn't any emulog created. GCC 5.0 was from Fedora 22 repos (only difference compared to stable 5.1 is disabled C11 by default). GCC 4.9.2 was compiled from sources.

I believe there isn't WxGTK3 package built against GTK2, so I wasn't able to test this combination. Here are some backtraces:

GCC 5.0, GTK 3, WxGTK 3:
Code:
(gdb) bt full
#0  0x0834bede in Console_SetActiveHandler(IConsoleWriter const&, _IO_FILE*) (writer=..., flushfp=0x0) at /home/fanys/pcsx2/common/src/Utilities/Console.cpp:58
        __PRETTY_FUNCTION__ = "void Console_SetActiveHandler(const IConsoleWriter&, FILE*)"
#1  0x081e5a19 in Pcsx2App::EnableAllLogging() (this=0xa162060)
    at /home/fanys/pcsx2/pcsx2/gui/ConsoleLogger.cpp:1212
        __PRETTY_FUNCTION__ = "void Pcsx2App::EnableAllLogging()"
        logBoxOpen = false
        newHandler = 0x84eb3dc <ConsoleWriter_Stdout>
#2  0x081d1816 in Pcsx2App::OnInit() (this=0xa162060)
    at /home/fanys/pcsx2/pcsx2/gui/AppInit.cpp:401
#3  0x081d322f in wxAppConsoleBase::CallOnInit() (this=0xa162060)
    at /usr/include/wx-3.0/wx/app.h:93
#4  0xf7df3282 in wxEntry(int&, wchar_t**) () at /lib/libwx_baseu-3.0.so.0
#5  0xf7df3307 in wxEntry(int&, char**) () at /lib/libwx_baseu-3.0.so.0
#6  0x081d4a65 in main(int, char**) (argc=1, argv=0xffffd0a4)
    at /home/fanys/pcsx2/pcsx2/gui/AppMain.cpp:53

GCC 5.0, GTK2, WX28
Code:
(gdb) bt full
#0  0x08333b9e in Console_SetActiveHandler(IConsoleWriter const&, _IO_FILE*) (writer=..., flushfp=0x0) at /home/fanys/pcsx2/common/src/Utilities/Console.cpp:58
        __PRETTY_FUNCTION__ = "void Console_SetActiveHandler(const IConsoleWriter&, FILE*)"
#1  0x081d9165 in Pcsx2App::EnableAllLogging() (this=0xa123948)
    at /home/fanys/pcsx2/pcsx2/gui/ConsoleLogger.cpp:1212
        __PRETTY_FUNCTION__ = "void Pcsx2App::EnableAllLogging()"
        logBoxOpen = false
        newHandler = 0x84c05b4 <ConsoleWriter_Stdout>
#2  0x081c5388 in Pcsx2App::OnInit() (this=0xa123948)
    at /home/fanys/pcsx2/pcsx2/gui/AppInit.cpp:401
#3  0x081c6b49 in wxAppConsole::CallOnInit() (this=0xa123948)
    at /usr/include/wx-2.8/wx/app.h:76
#4  0xf7ecba22 in wxEntry(int&, wchar_t**) () at /lib/libwx_baseu-2.8.so.0
#5  0xf7ecbad7 in wxEntry(int&, char**) () at /lib/libwx_baseu-2.8.so.0
#6  0x081c8424 in main(int, char**) (argc=1, argv=0xffffd0a4)
    at /home/fanys/pcsx2/pcsx2/gui/AppMain.cpp:53

GCC 4.9, GTK3, WX30 (this isn't backtrace, it's error printed to stdout by pcsx2)
Code:
Fatal Error: Mismatch between the program and library build versions detected.
The library used 3.0 (wchar_t,compiler with C++ ABI 1008,wx containers,compatible with 2.8),
and your program used 3.0 (wchar_t,compiler with C++ ABI 1002,wx containers,compatible with 2.8).
Neúspěšně ukončen (SIGABRT) (core dumped [obraz paměti uložen])

GCC 4.9, GTK2, WX28 works correctly. There are problems related to graphics but I suppose it'd be better to create another thread for this.
Reply

Sponsored links

#2
PCSX2 is working with GCC4.x, Clang, MS compiler. Honestly I'm not sure the issue is here. I suspect an issue with stack management (could be a stack leak/wrong alignment).

Personnally I will likely stay on GCC4.9 for a couple of months so I won't be able to debug it soon. Anyway if someone want to try, I suggest to try an asan build (./build.sh --asan --debug ... )
Reply
#3
So, GCC 5.1 is affected too.

It's probably not a big issue atm, since almost every distro (stable releases) is using GCC 4.9. Fedora 22 which is using GCC 5.0 will be released at the of May.
Reply
#4
Did fedora 22 allow to install gcc 4.9? On debian I can install multiple compiler?

It would also be intersting to know if others distributions are impacted.
Reply
#5
There is a compat-gcc-34 which provides gcc 3.4 and that's probably not enough. It might be possible to install different (older) gcc with specifying releasever (for example installing gcc from Fedora 21 to Fedora 22). But it will replace default gcc and it may cause lots of other dependency issues.

So no, it's basically not possible to install more versions of compiler. I had to download source tar and compile gcc myself.

Regarding other distributions, Ubuntu 15.04 is using gcc 4.9 by default and it's possible to install multiple versions of gcc. I don't know about others.
Reply
#6
So it sucks! I wilk try to install gcc5 when debian is completely unfrozen.
Reply
#7
You can compile new GCC yourself, it's pretty easy, maybe a little time consuming (took few hours on quad core Intel Bay Trail):
ftp://ftp.mirrorservice.org/sites/source...gcc-5.1.0/

You can specify --prefix=dir in gcc configure and then modify build.sh of pcsx2 by adding following lines (for example):
Code:
export CC=/home/fanys/gcc49/bin/gcc
export CXX=/home/fanys/gcc49/bin/g++
Reply
#8
Thanks but I have others priorities Wink
Reply
#9
Please find a patch attached.

Generate me a new backtrace if you have a SIGSEV.


Attached Files
.gz   gcc-5.patch.gz (Size: 1.013 bytes / Downloads: 325)
Reply
#10
I just compiled pcsx2 with this patch using gcc 5.1.0, it works, no more segfault.
Reply




Users browsing this thread: 1 Guest(s)