From d1f72f02d00d3bc6cf5e7f77d26f21c25682064c Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 15 Nov 2021 19:32:21 +0100 Subject: [PATCH] memprof: don't use thread user_id memprof does not use user_id for anything, so don't pass it to ThreadCreate. Passing a random field of MemprofThread as user_id does not make much sense anyway. Depends on D113920. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D113921 --- compiler-rt/lib/memprof/memprof_thread.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/compiler-rt/lib/memprof/memprof_thread.cpp b/compiler-rt/lib/memprof/memprof_thread.cpp index 5bac232..9512a87 100644 --- a/compiler-rt/lib/memprof/memprof_thread.cpp +++ b/compiler-rt/lib/memprof/memprof_thread.cpp @@ -80,8 +80,7 @@ MemprofThread *MemprofThread::Create(thread_callback_t start_routine, void *arg, thread->start_routine_ = start_routine; thread->arg_ = arg; MemprofThreadContext::CreateThreadContextArgs args = {thread, stack}; - memprofThreadRegistry().CreateThread(*reinterpret_cast(thread), - detached, parent_tid, &args); + memprofThreadRegistry().CreateThread(0, detached, parent_tid, &args); return thread; } -- 2.7.4