From 058a2fb0f47c26b35b9825f346ca6ca75a6a6769 Mon Sep 17 00:00:00 2001 From: XMRig Date: Wed, 22 Sep 2021 19:13:07 +0700 Subject: [PATCH 1/5] v6.15.2-dev --- src/version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) From 7daff331dc787a8f974128e25a5afb6b6f1052c2 Mon Sep 17 00:00:00 2001 From: SChernykh Date: Sun, 26 Sep 2021 12:22:58 +0200 Subject: [PATCH 2/5] Fix: AstroBWT auto-config ignored max-threads-hint --- src/backend/cpu/platform/HwlocCpuInfo.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) 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]; From a9d4c2a923269e5001c7fee96c2957170a92e834 Mon Sep 17 00:00:00 2001 From: XMRig Date: Tue, 28 Sep 2021 23:56:33 +0700 Subject: [PATCH 3/5] Removed uv_os_gethostname call for all OS. --- src/base/io/Env.cpp | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) 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 {}; } From 07e09665176811ab88c60d158580ca831a03086d Mon Sep 17 00:00:00 2001 From: XMRig Date: Tue, 5 Oct 2021 21:49:03 +0700 Subject: [PATCH 4/5] Added "--versions" alias. --- src/base/kernel/Entry.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } From 9ce207e667f3e1fac5be3024e82998adbd563944 Mon Sep 17 00:00:00 2001 From: xmrig Date: Tue, 5 Oct 2021 22:24:58 +0700 Subject: [PATCH 5/5] Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) 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.