diff --git a/CHANGELOG.md b/CHANGELOG.md index 0bae8c590..f3c885a81 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# v6.15.2 +- [#2606](https://github.com/xmrig/xmrig/pull/2606) Fixed: AstroBWT auto-config ignored `max-threads-hint`. +- Fixed possible crash on Windows (regression in v6.15.1). + # v6.15.1 - [#2586](https://github.com/xmrig/xmrig/pull/2586) Fixed Windows 7 compatibility. - [#2594](https://github.com/xmrig/xmrig/pull/2594) Added Windows taskbar icon colors. diff --git a/src/backend/cpu/platform/HwlocCpuInfo.cpp b/src/backend/cpu/platform/HwlocCpuInfo.cpp index 004f182f1..1c38f4c77 100644 --- a/src/backend/cpu/platform/HwlocCpuInfo.cpp +++ b/src/backend/cpu/platform/HwlocCpuInfo.cpp @@ -216,12 +216,6 @@ bool xmrig::HwlocCpuInfo::membind(hwloc_const_bitmap_t nodeset) xmrig::CpuThreads xmrig::HwlocCpuInfo::threads(const Algorithm &algorithm, uint32_t limit) const { -# ifdef XMRIG_ALGO_ASTROBWT - if (algorithm == Algorithm::ASTROBWT_DERO) { - return allThreads(algorithm, limit); - } -# endif - # ifndef XMRIG_ARM if (L2() == 0 && L3() == 0) { return BasicCpuInfo::threads(algorithm, limit); @@ -307,9 +301,16 @@ void xmrig::HwlocCpuInfo::processTopLevelCache(hwloc_obj_t cache, const Algorith size_t L2 = 0; int L2_associativity = 0; size_t extra = 0; - const size_t scratchpad = algorithm.l3(); + size_t scratchpad = algorithm.l3(); uint32_t intensity = algorithm.maxIntensity() == 1 ? 0 : 1; +# ifdef XMRIG_ALGO_ASTROBWT + if (algorithm == Algorithm::ASTROBWT_DERO) { + // Use fake low value to force usage of all available cores for AstroBWT (taking 'limit' into account) + scratchpad = 16 * 1024; + } +# endif + if (cache->attr->cache.depth == 3) { for (size_t i = 0; i < cache->arity; ++i) { hwloc_obj_t l2 = cache->children[i]; diff --git a/src/base/io/Env.cpp b/src/base/io/Env.cpp index e31cb43c0..6fef90732 100644 --- a/src/base/io/Env.cpp +++ b/src/base/io/Env.cpp @@ -142,38 +142,11 @@ xmrig::String xmrig::Env::get(const String &name, const std::map xmrig::String xmrig::Env::hostname() { -# ifdef _WIN32 - const HMODULE hLib = LoadLibraryA("Ws2_32.dll"); - if (hLib) { - typedef int (WSAAPI* GetHostNameW_proc)(PWSTR, int); - GetHostNameW_proc GetHostNameW_ptr = reinterpret_cast(GetProcAddress(hLib, "GetHostNameW")); - if (GetHostNameW_ptr) { - WCHAR buf[UV_MAXHOSTNAMESIZE]; - if (GetHostNameW_ptr(buf, UV_MAXHOSTNAMESIZE) != 0) { - return {}; - } - char utf8_str[UV_MAXHOSTNAMESIZE * 4 + 1]; - const int len = WideCharToMultiByte(CP_UTF8, 0, buf, -1, utf8_str, sizeof(utf8_str), nullptr, nullptr); - if (len <= 0) { - return {}; - } - return utf8_str; - } - } -# endif - char buf[UV_MAXHOSTNAMESIZE]{}; - size_t size = sizeof(buf); -# if (UV_VERSION_HEX >= 0x010c00) && !defined(_WIN32) - if (uv_os_gethostname(buf, &size) == 0) { + if (gethostname(buf, sizeof(buf)) == 0) { return static_cast(buf); } -# else - if (gethostname(buf, size) == 0) { - return static_cast(buf); - } -# endif return {}; } diff --git a/src/base/kernel/Entry.cpp b/src/base/kernel/Entry.cpp index c257ad243..f12e833f6 100644 --- a/src/base/kernel/Entry.cpp +++ b/src/base/kernel/Entry.cpp @@ -141,7 +141,7 @@ xmrig::Entry::Id xmrig::Entry::get(const Process &process) return Usage; } - if (args.hasArg("-V") || args.hasArg("--version")) { + if (args.hasArg("-V") || args.hasArg("--version") || args.hasArg("--versions")) { return Version; } diff --git a/src/version.h b/src/version.h index a797adcea..8ad674518 100644 --- a/src/version.h +++ b/src/version.h @@ -22,7 +22,7 @@ #define APP_ID "xmrig" #define APP_NAME "XMRig" #define APP_DESC "XMRig miner" -#define APP_VERSION "6.15.1" +#define APP_VERSION "6.15.2-dev" #define APP_DOMAIN "xmrig.com" #define APP_SITE "www.xmrig.com" #define APP_COPYRIGHT "Copyright (C) 2016-2021 xmrig.com" @@ -30,7 +30,7 @@ #define APP_VER_MAJOR 6 #define APP_VER_MINOR 15 -#define APP_VER_PATCH 1 +#define APP_VER_PATCH 2 #ifdef _MSC_VER # if (_MSC_VER >= 1920)