GPU detection code goes back and forth between program and data
directories but this is unnecessary because run_program() already takes
care of running the program in correct directory.
Fixes two "ignoring return value" warnings from GCC/GLIBC.
On Unixes, if GPU detection fails the client logs an error message
containing a raw value from waitpid() call. This raw value generally
requires writing an external program to decode it before it is useful
for troubleshooting.
Decode the raw value to something more useful to humans. Make a similar
change to Windows code too.
GPU detection tries to launch a copy of the client using argv[0] but
argv[0] doesn't always include path. If path is not included and current
directory is not the same as BOINC program directory then the GPU
detection fails.
Use full path to the client executable instead if possible. Quote the
path on Windows to handle paths with spaces.
GPU detection launches a copy of the client based on the contents of
argv[0]. If argv[0] doesn't include path to the client and the current
directory is not BOINC program directory then the GPU detection fails.
Hard coding the client name in --detach_console code only works because
of the extra work CreateProcess() does to find the executable. Launching
GPU detection uses CreateProcess() in a way that it doesn't try to find
the executable.
Fix this by using the full path to the client executable in
--detach_console code. This in turn makes the full path available to GPU
detection code. This also takes care of the case of the client
executable not being named boinc.exe.
We only need ints when calling md5_append(), so do the casting at
call-time. This reduces the number of casts needed, as well as silences
a compiler warning on VS 2005.
We need not worry about integer overflows, as md5_append checks if the
int argument is negative.
Use std::vector instead of allocated piece of memory to store multiple objects.
This hopefully fixes crash originally described in #2646 with heap destruction while copying data and next stacktrace:
> msvcr100d.dll!_CrtDbgBreak() Line 85 C
msvcr100d.dll!_VCrtDbgReportW(int nRptType, const wchar_t * szFile, int nLine, const wchar_t * szModule, const wchar_t * szFormat, char * arglist) Line 502 C
msvcr100d.dll!_CrtDbgReportWV(int nRptType, const wchar_t * szFile, int nLine, const wchar_t * szModule, const wchar_t * szFormat, char * arglist) Line 242 C++
msvcr100d.dll!_CrtDbgReportW(int nRptType, const wchar_t * szFile, int nLine, const wchar_t * szModule, const wchar_t * szFormat, ...) Line 258 + 0x2c bytes C++
msvcp100d.dll!std::_Debug_message(const wchar_t * message, const wchar_t * file, unsigned int line) Line 13 + 0x22 bytes C++
boinc.exe!std::_Vector_const_iterator<std::_Vector_val<WSL,std::allocator<WSL> > >::_Compat(const std::_Vector_const_iterator<std::_Vector_val<WSL,std::allocator<WSL> > > & _Right) Line 239 C++
boinc.exe!std::_Vector_const_iterator<std::_Vector_val<WSL,std::allocator<WSL> > >::operator==(const std::_Vector_const_iterator<std::_Vector_val<WSL,std::allocator<WSL> > > & _Right) Line 203 C++
boinc.exe!std::_Vector_const_iterator<std::_Vector_val<WSL,std::allocator<WSL> > >::operator!=(const std::_Vector_const_iterator<std::_Vector_val<WSL,std::allocator<WSL> > > & _Right) Line 208 + 0xf bytes C++
boinc.exe!std::vector<WSL,std::allocator<WSL> >::erase(std::_Vector_const_iterator<std::_Vector_val<WSL,std::allocator<WSL> > > * _First_arg, std::_Vector_const_iterator<std::_Vector_val<WSL,std::allocator<WSL> > > * _Last_arg) Line 1194 + 0xf bytes C++
boinc.exe!std::vector<WSL,std::allocator<WSL> >::clear() Line 1218 + 0xe1 bytes C++
boinc.exe!std::vector<WSL,std::allocator<WSL> >::operator=(const std::vector<WSL,std::allocator<WSL> > & _Right) Line 715 + 0xa bytes C++
boinc.exe!WSLS::operator=(const WSLS & __that) + 0x32 bytes C++
boinc.exe!HOST_INFO::operator=(const HOST_INFO & __that) + 0x458 bytes C++
boinc.exe!cpu_benchmarks(BENCHMARK_DESC * bdp) Line 219 C++
boinc.exe!win_cpu_benchmarks(void * p) Line 234 C++
kernel32.dll!00000000779d59cd()
[Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]
ntdll.dll!0000000077b0a561()
Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
newer_version_startup_check() compares gstate.client_version_check_url to nvc_config.client_version_check_url. If different, it clears gstate.newer_version and updates gstate.client_version_check_url.
Emphasize this difference by changing NVC_CONFIG struct member new_version_text to new_version_name.
Fix a bug I introduced in release_brand.sh script.
If nvc_config.cml file is absent, use default values.
Branded installers can create or replace this file to customize these values.
Standard (unbranded) BOINC installers should either delete the file or create or replace it with one containing default values.
Move WSL detection to get_host_info().
Enumerate available WSLs from registry.
Add wslapi library loading.
Add support of multiple installed wsl distros detection.
Detect only installed and configured distros.
Add extra information parse.
Add wslinfo files to save and parse wsl info.
Add dont_use_wsl param to cc_config.
Add missed hostinfo_wsl.cpp when building win client using gcc.
Fix small issues.
Small refactoring.
Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
Move WSL detection functions to separate file.
Update projet files for Windows, linux and MacOS
Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
Also change lookup token RPC to work better with AMs.
But client fixes are required to make it work completely right,
which will have to wait until 7.12.