From nobody Sat Dec 28 17:20:23 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YL8JR6MNCz5jfQS; Sat, 28 Dec 2024 17:20:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YL8JR5b2sz4mvq; Sat, 28 Dec 2024 17:20:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1735406423; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H8peRZTFtxzjsSldxKXZM7Hp7ECIlXWPSXqKiL3Wmsk=; b=OaENqOO+TBPyWiq1qFAi4zKnkzgNGeox3G6jOtzsKYn3U1Fcat4ux/PkiNNlVfORlZmvY2 4pYdXa99Y8qhFqG4Q9QQczVV0wk/Lj+ToluYIRz9Q2Z/FcFPjf6JI9FyZSswaE3QmD5Rn1 eW5I5nFjtYUFFu2OkmU0/nljzbSQddbQOCG2hHeazzVSHmnIWbIYRdojgLWy0YBFyLxtfr n+vOT/00j2SzZfZBF+9m0MEktxrb8Wjw4ZQuXcx02cuutpDAoaIVeKMkPg2bBPft/nQK5/ uhorOHAghTlzKq6NXSd/Sb2zZQ9WkIzNh6++Q1XcUYt93UUoDyM6XRD79gHyEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1735406423; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H8peRZTFtxzjsSldxKXZM7Hp7ECIlXWPSXqKiL3Wmsk=; b=XMllJ9amz7w1BcQGsPb9Z/Yhs3di7E3E8v/5uIeeVe6eq6AzSYO84yxjPN8VBfhsATeU9B nRqsDvseQDtMYuy/v54n3C/guA+bSeTKiJTeGyPt0PHcwBg/fJe9XpXiNkLcccJB7jazoR OlTEV4qi0D5GxyX51uKtizLLMprtQSuuAYq3RCUYf1OxpV/YgBCjNJ0EXglLae9/JWSJy+ hvopIKAKHKBRtjVSey27kat5T+BdZdgEdJ/GS9tq/75ud3TNIMtd7DAjqYxrr5ghzd3xKc n/oyzob7gvLfRTOCkM/Jy3vrUSfiJ+djA0hpO4CP5VzvTo0McJMMSofuXuRg8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1735406423; a=rsa-sha256; cv=none; b=oxlfx8OKtAyhgYmXtut9TDhAa9Mj0NrmaT/dcwQ8zqn/4jDgVzeD4OFxNtTteWuyiQZzjl VpqV0GK5OmCePh37xVnPqVs7NtWTUKq58boiqeij48dlVvES57//NHLWzOhEI2jWuixENu p2sS2RKpC1dxJ2b8TeuDhi8G6gBvXhnQ1ugc6FG6Jzd7mGcQUOIh2EH5CHOIuJFvY+gI8d uxTnOaIDOLQRKz0RXyEYAxVfX5KMLJE5SEj+WxkeKGiEsg5SKAJ1K9M/qesQY/HXLq+1I7 oIuxhvNFuRbVKa78wA0AvTmZl+XsSFGNmXZ156rJdr/BULj9WSBmkG8Zz8t9Ew== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YL8JR52Y3zYJg; Sat, 28 Dec 2024 17:20:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4BSHKNbr061939; Sat, 28 Dec 2024 17:20:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4BSHKNTd061936; Sat, 28 Dec 2024 17:20:23 GMT (envelope-from git) Date: Sat, 28 Dec 2024 17:20:23 GMT Message-Id: <202412281720.4BSHKNTd061936@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 86f6ff9ff00e - main - libthr: move dlerror_msg into zeroed part of struct thread List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 86f6ff9ff00e2ba4d4cd5b7a94d57b1c3f85ff98 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=86f6ff9ff00e2ba4d4cd5b7a94d57b1c3f85ff98 commit 86f6ff9ff00e2ba4d4cd5b7a94d57b1c3f85ff98 Author: Konstantin Belousov AuthorDate: 2024-12-23 23:48:58 +0000 Commit: Konstantin Belousov CommitDate: 2024-12-28 17:01:34 +0000 libthr: move dlerror_msg into zeroed part of struct thread struct thread reuse might cause stalled rtld error message to propagate to the new thread. Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D48200 --- lib/libthr/thread/thr_private.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/libthr/thread/thr_private.h b/lib/libthr/thread/thr_private.h index d6c12348e3ab..926e868293cd 100644 --- a/lib/libthr/thread/thr_private.h +++ b/lib/libthr/thread/thr_private.h @@ -562,8 +562,12 @@ struct pthread { /* Deferred threads from pthread_cond_signal. */ unsigned int *defer_waiters[MAX_DEFER_WAITERS]; -#define _pthread_endzero wake_addr + /* rtld thread-local dlerror message and seen control */ + char dlerror_msg[512]; + int dlerror_seen; + +#define _pthread_endzero wake_addr struct wake_addr *wake_addr; #define WAKE_ADDR(td) ((td)->wake_addr) @@ -572,10 +576,6 @@ struct pthread { /* pthread_set/get_name_np */ char *name; - - /* rtld thread-local dlerror message and seen control */ - char dlerror_msg[512]; - int dlerror_seen; }; #define THR_SHOULD_GC(thrd) \