From nobody Thu Feb 10 20:47:50 2022 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 B8F8919A9B1B; Thu, 10 Feb 2022 20:47:51 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JvpjL5Hycz4Tn8; Thu, 10 Feb 2022 20:47:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644526070; 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=M8OJHKti5rGqSuzJI52xXKcJlLESf93jRbyZL4Nf2ks=; b=ScQOxaLa4/45ze3hArf7bDWxW7+hi3b1IG4OgJlUD5zdk/Oy4VKmlcyPZcTD6RsSNLbWrY XAhZTZHKPjPqZi5OwBUUKj3BYgDcvbN3NAg15h+Ht+fXfbRFHzwXHU0vSpIRjfyblRKAQ6 0PKvZBJS2xbjX8B4w67gZcl4R55a5EJ0iHmddE6LvDJgh72VlCsAwkUbJkVru7LS7LjbRJ lSYK+DASQYdHW/cpgdYPXduwxTnhRYt1lZ8+QVquhwmXldbovy5FzwL4OSLyaapGzAgNXv 3HooDxPk7ZAQkNN2J46j5C8bpp5/k5V6L41nEgZOcrkBqwq6Heyke1p+FA+jlA== 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 8B37126D76; Thu, 10 Feb 2022 20:47:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 21AKloGK016931; Thu, 10 Feb 2022 20:47:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 21AKloo2016930; Thu, 10 Feb 2022 20:47:50 GMT (envelope-from git) Date: Thu, 10 Feb 2022 20:47:50 GMT Message-Id: <202202102047.21AKloo2016930@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: bbf4df172206 - main - libthr: Disable stack unwinding on ARM. 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bbf4df1722060fb78939419476fb624114fb303d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644526070; 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=M8OJHKti5rGqSuzJI52xXKcJlLESf93jRbyZL4Nf2ks=; b=L9YC6lMzZ8pZ/uoHQiHTDFZxSMvMSVLxLV8rIh5V2Pk0778y40zjU7d+L01MxbQWZY6HzX g6EZfOSse8SWhOQ7/adqkjdQ5dGxhnA3WNM00+Qn7Vv5yfWZU9QdNfGCwJu9G8C9duWjmd h4FUuqVCyE2+J/niDVfrk/kSh5tHErelTmOuDp625U3kwMDGnyGikElFgi+sx12zKK5tan aFHoxELqfKBMZeimfMtUP9USgnFyvzXCciXlxTxAjo4EXyZ/4/i3goJinAxsyCFL8CFnG6 S/Pp136NNzizHGTbRxxFcNITwZrWs00l1oI5psf8rlnFxRrkSJL96V2Cmv0H6w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1644526070; a=rsa-sha256; cv=none; b=bavrKOAizMg6SjVOf1ql410D/QGMePMPhaopCUNq70/PW2CWZjs0+3q9xk6kqy7pEhS2jz 6f016GXUi6ZaxrxEQnV1BFSAAA1a4qEsER7z8MbOVEUhGpJXP+YWLytmCgjOrVRlV1LQR1 V6KVfY6bpa7Zs/+bpCiadn44UxOn1ySA4n55Iua8xh3LYpaWEhrmNMs6HzC2+StsFbLXaj 8LJi8b49Jn6PnJzGNPYrVqEqmHhC9zurGPXLSKYz8W/cyWHWMf+TGfJ0Sk5H+Qyl82c41V hP4vSP0imNsXmzSdU+Ydsax1F98F5Eu1ZByI4Gv76Ra2Qc7TfvBsDnoMIHhBlA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=bbf4df1722060fb78939419476fb624114fb303d commit bbf4df1722060fb78939419476fb624114fb303d Author: John Baldwin AuthorDate: 2022-02-10 20:47:08 +0000 Commit: John Baldwin CommitDate: 2022-02-10 20:47:08 +0000 libthr: Disable stack unwinding on ARM. When a thread exits, _Unwind_ForcedUnwind() is used to walk up stack frames executing pending cleanups pushed by pthread_cleanup_push(). The cleanups are popped by thread_unwind_stop() which is passed as a callback function to _Unwind_ForcedUnwind(). LLVM's libunwind uses a different function type for the callback on 32-bit ARM relative to all other platforms. The previous unwind.h header (as well as the unwind.h from libcxxrt) use the non-ARM type on all platforms, so this has likely been broken on 32-bit arm since it switched to using LLVM's libunwind. For now, just disable stack unwinding on 32-bit arm to unbreak the build until a proper fix is tested. --- lib/libthr/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/libthr/Makefile b/lib/libthr/Makefile index 8fbd685e9f4b..062f5eec5d88 100644 --- a/lib/libthr/Makefile +++ b/lib/libthr/Makefile @@ -35,6 +35,10 @@ CFLAGS.thr_symbols.c+= -Wno-missing-variable-declarations CFLAGS.thr_sig.c+= -fno-sanitize=address .endif +.if ${MACHINE_CPUARCH} == "arm" +NO_THREAD_UNWIND_STACK= yes +.endif + .ifndef NO_THREAD_UNWIND_STACK CFLAGS+=-fexceptions CFLAGS+=-D_PTHREAD_FORCED_UNWIND