mirror of
https://github.com/nodejs/node-v0.x-archive.git
synced 2026-04-28 03:01:10 -04:00
crypto: store thread id as pointer-sized
In59658a8de7the return of uv_thread_self() was changed from unsigned long to uv_thread_t. uv_thread_t is a HANDLE (pointer-sized) on Windows, which means that on Win64 it cannot be stored with CRYPTO_THREADID_set_numeric without data loss. Furthermore, without this change there will be a build break on Windows when the libuv change is integrated into Node, because of the conversion from HANDLE to unsigned long. Other related commits:5845a6bcd5919d8ec63a
This commit is contained in:
@@ -151,7 +151,8 @@ template int SSLWrap<TLSCallbacks>::TLSExtStatusCallback(SSL* s, void* arg);
|
||||
|
||||
|
||||
static void crypto_threadid_cb(CRYPTO_THREADID* tid) {
|
||||
CRYPTO_THREADID_set_numeric(tid, uv_thread_self());
|
||||
assert(sizeof(uv_thread_t) <= sizeof(void*));
|
||||
CRYPTO_THREADID_set_pointer(tid, (void*) uv_thread_self());
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user