Repository: randombit/botan
Pull request #3738 (2023-10-07 12:16:53)

OS::set_thread_name attempt to port to windows >= 10


Patch:
diff --git a/doc/pgpkey.txt b/doc/pgpkey.txt
index fa11a428a..480eaf0e5 100644
--- a/doc/pgpkey.txt
+++ b/doc/pgpkey.txt
@@ -52,71 +52,100 @@ uW9laI9VBgrtMTBbYrylBytXiF0Flzx+bd21krgL37NH2uU0EHPjSx571q/XGG2U
 4iOEPvPu7vtV8Rpqd0xQyaHcpoHNklcfND1c/6uZG1Sx9atDScRYHinUZvtTRtN+
 OY5vW+H7LJqT6CeMjh6Ev53V+0JCDZFQLaBdP/NanSQBUhPkyfyQSiqWOSuaMD6n
 Eu+BigmzwDlsauuReTJ65gdIGI9Egt7Ax/ooKpBvPkWeT+GORKTs+qGy6sbKXrTe
-crFFN/HZPWAJ+c8AEQEAAbQfSmFjayBMbG95ZCA8amFja0ByYW5kb21iaXQubmV0
-PokB0QQTAQoAOwIbAwULCQgHAgYVCAkKCwIEFgIDAQIeAQIXgBYhBE5gxzVRryGI
-3wpaYnjpgENXEjtgBQJlIUveAhkBAAoJEHjpgENXEjtg9d0L/iMxl7bVhwrRNUDo
-fdxZoCVPqPBnA29uiwN4Ff8VIr5yiA39DYAD14PoQN8+mVc9+0P5ersLanszSg7b
-ZMLd1s39Ryydy2YfXqk9jHlDOFpsimknAd+NEYYPrRTQ+dybk9qoL/qeNxZl7Oig
-/GyMS96I9PDHLx43gBe4OsIe+QB2ulgVTMIDwnMyeuaIDRmL+w4+caTxKBj4fwtV
-3SN1VSugEV1Uli0Ofk1yp+NsEIVyOJCi7mV/KLmffdAMqSoBnHZvNqz65i4Tt2mV
-PvEb5Xvh5E4HBGLCFNj5XEFZmWvjOhkx7XyaJBqHS2I3j/JWGhpLDXwITlpQLBMi
-ssstlL4ju+STOCfGWDQjOxFGelgbjD54Pu2N/TlidT5FORLguR0Eqtb0A6gYybNh
-UY/dJqbSPegd9xFWszrnO5o7sV3O1x5oWIOkEi/IYhy9SschPPi3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=M25I
 -----END PGP PUBLIC KEY BLOCK-----
 
 This key is used for signing git commits:
diff --git a/src/lib/utils/alignment_buffer.h b/src/lib/utils/alignment_buffer.h
index 64b7bec1c..87e1a6214 100644
--- a/src/lib/utils/alignment_buffer.h
+++ b/src/lib/utils/alignment_buffer.h
@@ -77,10 +77,8 @@ class AlignmentBuffer {
        * Fills the currently unused bytes of the buffer with zero bytes
        */
       void fill_up_with_zeros() {
-         if(!ready_to_consume()) {
-            clear_mem(&m_buffer[m_position], elements_until_alignment());
-            m_position = m_buffer.size();
-         }
+         clear_mem(&m_buffer[m_position], elements_until_alignment());
+         m_position = m_buffer.size();
       }
 
       /**
diff --git a/src/lib/utils/os_utils.cpp b/src/lib/utils/os_utils.cpp
index 9a6e14842..219c81881 100644
--- a/src/lib/utils/os_utils.cpp
+++ b/src/lib/utils/os_utils.cpp
@@ -52,6 +52,10 @@
    #define NOMINMAX 1
    #define _WINSOCKAPI_  // stop windows.h including winsock.h
    #include <windows.h>
+   #if defined(BOTAN_BUILD_COMPILER_IS_MSVC)
+      #include <libloaderapi.h>
+      #include <stringapiset.h>
+   #endif
 #endif
 
 #if defined(BOTAN_TARGET_OS_IS_ANDROID)
@@ -624,8 +628,19 @@ void OS::set_thread_name(std::thread& thread, const std::string& name) {
    #elif defined(BOTAN_TARGET_OS_IS_NETBSD)
    static_cast<void>(pthread_set_name_np(thread.native_handle(), "%s", const_cast<char*>(name.c_str())));
    #elif defined(BOTAN_TARGET_OS_HAS_WIN32) && defined(BOTAN_BUILD_COMPILER_IS_MSVC)
-   // Using SetThreadDescription from Win10
-   BOTAN_UNUSED(thread, name);
+   typedef HRESULT(WINAPI * std_proc)(HANDLE, PCWSTR);
+   HMODULE kern = GetModuleHandleA("KernelBase.dll");
+   std_proc set_thread_name = reinterpret_cast<std_proc>(GetProcAddress(kern, "SetThreadDescription"));
+   if(set_thread_name) {
+      std::wstring w;
+      auto sz = MultiByteToWideChar(CP_UTF8, 0, name.data(), -1, nullptr, 0);
+      if(sz > 0) {
+         w.resize(sz);
+         if(MultiByteToWideChar(CP_UTF8, 0, name.data(), -1, &w[0], sz) > 0) {
+            (void)set_thread_name(thread.native_handle(), w.c_str());
+         }
+      }
+   }
    #else
    // TODO other possible oses ?
    // macOs does not seem to allow to name threads other than the current one.


Test patch:
diff --git a/src/tests/test_utils_buffer.cpp b/src/tests/test_utils_buffer.cpp
index d8f7045f3..131a2f002 100644
--- a/src/tests/test_utils_buffer.cpp
+++ b/src/tests/test_utils_buffer.cpp
@@ -269,17 +269,6 @@ std::vector<Test::Result> test_alignment_buffer() {
 
                result.test_is_eq("prefix", v(out.first(16)), v(first_half_data));
                result.test_is_eq("zero-padding", v(out.last(16)), std::vector<uint8_t>(16, 0));
-
-               // Regression test for GH #3734
-               // fill_up_with_zeros() must work if called on a full (ready to consume) alignment buffer
-               b.append(data);
-               result.confirm("ready_to_consume()", b.ready_to_consume());
-               result.test_eq("elements_until_alignment()", b.elements_until_alignment(), 0);
-
-               b.fill_up_with_zeros();
-               const auto out_without_padding = b.consume();
-
-               result.test_is_eq("no padding", v(out_without_padding), v(data));
             }),
 
       CHECK("Handle unaligned data in Alignment Buffer (no block-defer)",