Hello
We found a segfault when running gspim on macOS Ventura. There might be an issue with undefined behavior, relating to static class member s_ProgramFileTypeList initialization order.
Here is a patch that fixes it:
_END__
--- gpsim-0.32.1-old/src/program_files.cc 2023-12-05 23:22:02
+++ gpsim-0.32.1/src/program_files.cc 2023-12-05 23:22:10
@@ -97,6 +97,7 @@
ProgramFileTypeList &ProgramFileTypeList::GetList()
{
+ static ProgramFileTypeList s_ProgramFileTypeList = new ProgramFileTypeList();
return s_ProgramFileTypeList;
}
Anonymous
Diff:
I have attached my fix to the issue. Can you try it and see that it fixes the issue.
Roy
I confirm that your patch fixes it too.
Alternative fix made.