MantisBT - Doomseeker
View Issue Details
0003908Doomseeker[All Projects] Bugpublic2021-09-24 17:292021-09-27 11:45
WubTheCaptain 
 
normalminorhave not tried
acknowledgedopen 
1.3.2 
 
0003908: zandronumbinaries.cpp does not make sure the downloaded Zandronum testing binaries are supported by the CPU architecture
A theoretical scenario: An user is running on GNU/Linux using an ARM processor (32-bit or 64-bit). They try to download Zandronum testing binaries. Instead of Doomseeker refusing to download anything or theoretically attempt to download a file appropriate for the architecture build (such as ARM), Doomseeker will always download the x86 (32-bit) binaries.

On Windows (if ever on non-x86), they would always get 32-bit x86 Windows binaries for Zandronum.

The issue is the program didn't check the build or CPU architecture.
Quote from src/plugins/zandronum/zandronumbinaries.cpp
#ifdef Q_OS_WIN32
#define TESTING_BINARY_URL TESTING_BINARY_URL_BASE "windows.zip"
#define ZANDRONUM_BINARY_NAME "zandronum.exe"
#define SCRIPT_FILE_EXTENSION ".bat"
#else

#ifndef __x86_64__
#define TESTING_BINARY_URL TESTING_BINARY_URL_BASE "linux-x86.tar.bz2"
#else
#define TESTING_BINARY_URL TESTING_BINARY_URL_BASE "linux-x86_64.tar.bz2"
#endif

#ifndef Q_OS_DARWIN
#define ZANDRONUM_BINARY_NAME "zandronum"
#else
#define ZANDRONUM_BINARY_NAME "Zandronum.app"
#define ZANDRONUM_APP_BUNDLE_BIN "/Contents/MacOS/zandronum"
#endif
#define SCRIPT_FILE_EXTENSION ".sh"
#endif
  • QSysInfo::buildCpuArchitecture()
  • QSysInfo::currentCpuArchitecture()
No tags attached.
related to 0003905confirmed  zandronumbinaries.cpp OS-dependent macro hell is quite ugly (and broken) 
Issue History
2021-09-24 17:29WubTheCaptainNew Issue
2021-09-24 17:30WubTheCaptainNote Added: 0021770
2021-09-24 17:30WubTheCaptainDescription Updatedbug_revision_view_page.php?rev_id=13365#r13365
2021-09-24 17:33WubTheCaptainNote Added: 0021771
2021-09-24 17:36WubTheCaptainRelationship addedrelated to 0003905
2021-09-27 11:45ZalewaNote Added: 0021776
2021-09-27 11:45ZalewaStatusnew => acknowledged

Notes
(0021770)
WubTheCaptain   
2021-09-24 17:30   
As of 2021-09-24, Zandronum.com does not have desired non-x86/non-x86_64 binaries for Zandronum (e.g. ARM).
(0021771)
WubTheCaptain   
2021-09-24 17:33   
The Zandronumq plugin (engine) does not support downloading test binaries, so that plugin is not affected.
(0021776)
Zalewa   
2021-09-27 11:45   
We should treat this case the same as we treat the Mac case - fail miserably, but properly with an error message :D