We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0913a51 commit 465555eCopy full SHA for 465555e
lib/check.cpp
@@ -42,7 +42,15 @@ void Check::reportError(const ErrorLogger::ErrorMessage &errmsg)
42
{
43
std::cout << errmsg.toXML(true, 1) << std::endl;
44
}
45
+
46
std::list<Check *> &Check::instances() {
47
+#ifdef __SVR4
48
+ // Under Solaris, destructors are called in wrong order which causes a segmentation fault.
49
+ // This fix ensures pointer remains valid and reachable until program terminates.
50
static std::list<Check *> *_instances= new std::list<Check *>;
51
return *_instances;
52
+#else
53
+ static std::list<Check *> _instances;
54
+ return _instances;
55
+#endif
56
0 commit comments