mupen64plus / mupen64plus-video-glide64mk2

Video plugin for Mupen64Plus 2.0 based on 10th anniversary release code from gonetz
28 stars 37 forks source link

ci: Build failure #131

Closed GhostlyDark closed 3 months ago

GhostlyDark commented 3 months ago

Looks like I broke ci with removing boost. Could you take a look @Jj0YzL5nvJ?

richard42 commented 3 months ago

it could be that the compiler configured for the CI build is too old. It looks like the Linux build is the one that's failing, and I just built it on my Gentoo machine with GCC 13.2.1, and it built successfully.

Jj0YzL5nvJ commented 3 months ago

The culprit is SDL1.2

richard42 commented 3 months ago

Coverity also sent me an email with some problems flagged by its static scan:

*** CID 425816:    (UNCAUGHT_EXCEPT)
/src/GlideHQ/TxHiResCache.cpp: 64 in TxHiResCache::~TxHiResCache()()
58     #include "TxHiResCache.h"
59     #include "TxDbg.h"
60     #include "../Glide64/Gfx_1.3.h"
61     #include "osal_files.h"
62     
63     
>>>     CID 425816:    (UNCAUGHT_EXCEPT)
>>>     An exception of type "std::filesystem::__cxx11::filesystem_error" is thrown but the exception specification "/*implicit*/noexcept" doesn't allow it to be thrown. This will result in a call to terminate().
64     TxHiResCache::~TxHiResCache()
65     {
66     #ifdef DUMP_CACHE
67       if ((_options & DUMP_HIRESTEXCACHE) && !_haveCache && !_abortLoad) {
68         /* dump cache to disk */
69         std::wstring filename = _ident + L"_HIRESTEXTURES.dat";
/src/GlideHQ/TxHiResCache.cpp: 64 in TxHiResCache::~TxHiResCache()()
58     #include "TxHiResCache.h"
59     #include "TxDbg.h"
60     #include "../Glide64/Gfx_1.3.h"
61     #include "osal_files.h"
62     
63     
>>>     CID 425816:    (UNCAUGHT_EXCEPT)
>>>     An exception of type "std::filesystem::__cxx11::filesystem_error" is thrown but the exception specification "/*implicit*/noexcept" doesn't allow it to be thrown. This will result in a call to terminate().
64     TxHiResCache::~TxHiResCache()
65     {
66     #ifdef DUMP_CACHE
67       if ((_options & DUMP_HIRESTEXCACHE) && !_haveCache && !_abortLoad) {
68         /* dump cache to disk */
69         std::wstring filename = _ident + L"_HIRESTEXTURES.dat";
/src/GlideHQ/TxHiResCache.cpp: 64 in TxHiResCache::~TxHiResCache()()
58     #include "TxHiResCache.h"
59     #include "TxDbg.h"
60     #include "../Glide64/Gfx_1.3.h"
61     #include "osal_files.h"
62     
63     
>>>     CID 425816:    (UNCAUGHT_EXCEPT)
>>>     An exception of type "std::filesystem::__cxx11::filesystem_error" is thrown but the exception specification "/*implicit*/noexcept" doesn't allow it to be thrown. This will result in a call to terminate().
64     TxHiResCache::~TxHiResCache()
65     {
66     #ifdef DUMP_CACHE
67       if ((_options & DUMP_HIRESTEXCACHE) && !_haveCache && !_abortLoad) {
68         /* dump cache to disk */
69         std::wstring filename = _ident + L"_HIRESTEXTURES.dat";

** CID 425815:  Memory - corruptions  (OVERRUN)
/src/GlideHQ/osal_files_unix.c: 142 in osal_search_dir_read_next()

________________________________________________________________________________________________________
*** CID 425815:  Memory - corruptions  (OVERRUN)
/src/GlideHQ/osal_files_unix.c: 142 in osal_search_dir_read_next()
136         if (dir_handle == NULL)
137             return NULL;
138     
139         entry = readdir(dir);
140         if (entry == NULL)
141             return NULL;
>>>     CID 425815:  Memory - corruptions  (OVERRUN)
>>>     Overrunning array "entry->d_name" of 256 bytes by passing it to a function which accesses it at byte offset 4095 using argument "4096UL".
142         mbstowcs(last_filename, entry->d_name, PATH_MAX);
143         return last_filename;
144     }
145     
146     EXPORT void CALL osal_search_dir_close(void * dir_handle)
147     {

** CID 425814:    (UNCAUGHT_EXCEPT)
/src/GlideHQ/TxTexCache.cpp: 34 in TxTexCache::~TxTexCache()()
/src/GlideHQ/TxTexCache.cpp: 34 in TxTexCache::~TxTexCache()()
/src/GlideHQ/TxTexCache.cpp: 34 in TxTexCache::~TxTexCache()()

________________________________________________________________________________________________________
*** CID 425814:    (UNCAUGHT_EXCEPT)
/src/GlideHQ/TxTexCache.cpp: 34 in TxTexCache::~TxTexCache()()
28     #include "TxTexCache.h"
29     #include "TxDbg.h"
30     #include <zlib.h>
31     #include <string>
32     #include <filesystem>
33     
>>>     CID 425814:    (UNCAUGHT_EXCEPT)
>>>     An exception of type "std::filesystem::__cxx11::filesystem_error" is thrown but the exception specification "/*implicit*/noexcept" doesn't allow it to be thrown. This will result in a call to terminate().
34     TxTexCache::~TxTexCache()
35     {
36     #ifdef DUMP_CACHE
37       if (_options & DUMP_TEXCACHE) {
38         /* dump cache to disk */
39         std::wstring filename = _ident + L"_MEMORYCACHE.dat";
/src/GlideHQ/TxTexCache.cpp: 34 in TxTexCache::~TxTexCache()()
28     #include "TxTexCache.h"
29     #include "TxDbg.h"
30     #include <zlib.h>
31     #include <string>
32     #include <filesystem>
33     
>>>     CID 425814:    (UNCAUGHT_EXCEPT)
>>>     An exception of type "std::filesystem::__cxx11::filesystem_error" is thrown but the exception specification "/*implicit*/noexcept" doesn't allow it to be thrown. This will result in a call to terminate().
34     TxTexCache::~TxTexCache()
35     {
36     #ifdef DUMP_CACHE
37       if (_options & DUMP_TEXCACHE) {
38         /* dump cache to disk */
39         std::wstring filename = _ident + L"_MEMORYCACHE.dat";
/src/GlideHQ/TxTexCache.cpp: 34 in TxTexCache::~TxTexCache()()
28     #include "TxTexCache.h"
29     #include "TxDbg.h"
30     #include <zlib.h>
31     #include <string>
32     #include <filesystem>
33     
>>>     CID 425814:    (UNCAUGHT_EXCEPT)
>>>     An exception of type "std::filesystem::__cxx11::filesystem_error" is thrown but the exception specification "/*implicit*/noexcept" doesn't allow it to be thrown. This will result in a call to terminate().
34     TxTexCache::~TxTexCache()
35     {
36     #ifdef DUMP_CACHE
37       if (_options & DUMP_TEXCACHE) {
38         /* dump cache to disk */
39         std::wstring filename = _ident + L"_MEMORYCACHE.dat";

** CID 38111:  Security best practices violations  (TOCTOU)
/src/GlideHQ/osal_files_unix.c: 103 in osal_mkdirp()

________________________________________________________________________________________________________
*** CID 38111:  Security best practices violations  (TOCTOU)
/src/GlideHQ/osal_files_unix.c: 103 in osal_mkdirp()
97             currpath[strlen(currpath)] = '/';
98         }
99     
100         /* then walk up the path chain, creating directories along the way */
101         do
102         {
>>>     CID 38111:  Security best practices violations  (TOCTOU)
>>>     Calling function "stat" to perform check on "currpath".
103             if (stat(currpath, &fileinfo) != 0)
104             {
105                 if (mkdir(currpath, 0700) != 0)
106                 {
107                     free(currpath);
108                     return 1;        /* mkdir failed */