From nobody Tue Jan 21 00:26:42 2025 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 4YcSgl3H5Qz5lBxJ; Tue, 21 Jan 2025 00:26:43 +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 4YcSgk6Mq5z3Mb8; Tue, 21 Jan 2025 00:26:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737419202; 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=E9HERNyk/V5CTV1WLwo2KqOvY1gVInPW0i1Y8U8lJc8=; b=CW9vZKFsfCRbrBMY9E2dd1S1tAg5qOeb32kDhyEOqB0Qs+I3p1NZN7ULOsOw4UI5yraxMl 62PR0h9wMFxwNdrhE1QsWBcz6O33o5hdSYP3UisJRcNkzurw1WysjTfyHYLLDNQ0x+HlZu r+yfIUyAKzSVJQhwrT6Dg2AzPCt6WvvxzYsI5Vjclt5C8nfacNyL6tcw4JAqn0tUJpvW+e 5Mei4dH8swDe41qHflDPwKQCoh3CkZ8yD9sWnZ4OZomM1wVybhkKizx0vHoGFyeer70vUX BQ2ZWlsQunJv45Rfa/Vn4kjzyRyIPX2KFjxizp3IhLKV7LTOaIM62db/XLFf2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737419202; 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=E9HERNyk/V5CTV1WLwo2KqOvY1gVInPW0i1Y8U8lJc8=; b=VjHroQz9FltQQbbUdA3Eo5vBVjYdX6Hocj6qbms+qa/a55GzY8MXNqMV1xPRaR+1LHjmPh wNXDhjYvqX+10MHcCT/CuXwGPlppS25gMLN2mzoU8+vN0N+rKdB49wFRNQiPqgRdgc8/eK rlDlqJF2ySD5dCfCAb2e4iXJeQxwez/Iz1/up7qAx9IxkR6HSlACr1a3dwkX66sxkq5xJe SwdnMIKf0ApNPpr+RLKjumzYnt9FBF0QNOfs/byYP0/ReKCPdH9WHMcfYr4b70EmFS/8yL nfbHR6/klL5Vl86ffm7bIFMazOJB4KKbaFkVVsJnRj1oELPg8uImv6DLsY3JrQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737419202; a=rsa-sha256; cv=none; b=yUosP3H3fxmzlRE/d75Ruxq3zdYcknZ4HPKoQQH8vk+1TTEUTZSXFXiyuOSwn0g2hjtNNd GYYdrJuwJ1tk/euGlJbNUaD6MwzKcHD+IFkdniMzy291MnalMODc79vSxFPyvn+8E/rQ+d jduDfNkXSrq0DvnLRHd13GNWj+mQmr6UdDN67K8aVPpqWOPjJTOJEpKdZoF0dvh4C7XKaM bmXOPUeT+8/bZllkgXwTE7tfd3qVqGx1Yl0HLu3JOQfKc96uu6pn2OeebYhns50x61sdXj kWUF0GgGe+aexzSlQpD/CYgbozFWM80nbH6ZoIHKFyrcjGY/uMaoQXb983csxA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4YcSgk5s66zk3Y; Tue, 21 Jan 2025 00:26:42 +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 50L0QgA1013289; Tue, 21 Jan 2025 00:26:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50L0QgEY013286; Tue, 21 Jan 2025 00:26:42 GMT (envelope-from git) Date: Tue, 21 Jan 2025 00:26:42 GMT Message-Id: <202501210026.50L0QgEY013286@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: e2268518dff0 - stable/14 - libpthread_init(): ensure curthread == NULL until set explicitly 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/stable/14 X-Git-Reftype: branch X-Git-Commit: e2268518dff082d32b8399ccdac37ce3c597f178 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e2268518dff082d32b8399ccdac37ce3c597f178 commit e2268518dff082d32b8399ccdac37ce3c597f178 Author: Konstantin Belousov AuthorDate: 2025-01-14 22:11:48 +0000 Commit: Konstantin Belousov CommitDate: 2025-01-21 00:24:55 +0000 libpthread_init(): ensure curthread == NULL until set explicitly (cherry picked from commit 676be27133fa3296f3d9083732d8837a3eaa5ea4) --- lib/libthr/thread/thr_init.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/libthr/thread/thr_init.c b/lib/libthr/thread/thr_init.c index ff59288d919e..80f7c05ee5ce 100644 --- a/lib/libthr/thread/thr_init.c +++ b/lib/libthr/thread/thr_init.c @@ -332,6 +332,8 @@ _libpthread_init(struct pthread *curthread) /* Set the initial thread. */ if (curthread == NULL) { first = 1; + /* Force _get_curthread() return NULL until set. */ + _tcb_get()->tcb_thread = NULL; /* Create and initialize the initial thread. */ curthread = _thr_alloc(NULL); if (curthread == NULL)