From nobody Sun Feb 20 12:31:06 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 C3AD319DAF67; Sun, 20 Feb 2022 12:31:07 +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 4K1lCb1D4Kz4p8s; Sun, 20 Feb 2022 12:31:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645360267; 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=7NxMeW+NcH8s9YMYPbdG+6QZN9Bt4Yq64op2VgWu4zM=; b=DN+0YLH1eUQR3gYS43+YaF1TFByoU2djctJ5OQ+oY90Vw3cv5b7FXJXBG5bpbrM6Zjt+ee voJWf6BEyS+TdpaeR+iBVQLtKYpWmyTaxkeo5riL5NLY4N0EOeqk8q6qG/JxQxS84W0hBC /8a9sGtBOVOwIL1mC9ws1G8dVI2RQ84GCz+YCfc5W/XiZCnVIYvoJyMqNuw2Ht83x3ZACf 07R3Pf6wqev4cWcV2U2YAw0DoZBIOAAfSidAxQyHYup8i19sWvoO8sk8HQxPuZpT5iPK3/ CAA/IN5FRAJuWxOngVDziJCRy64a4gonwAgv7tP6j+Mywp3QnMZK4n8DZFpQiA== 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 EE4B51CA20; Sun, 20 Feb 2022 12:31:06 +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 21KCV6jK050890; Sun, 20 Feb 2022 12:31:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 21KCV6RN050889; Sun, 20 Feb 2022 12:31:06 GMT (envelope-from git) Date: Sun, 20 Feb 2022 12:31:06 GMT Message-Id: <202202201231.21KCV6RN050889@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: d378ddab7966 - stable/13 - 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: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d378ddab79668c70d174bd20179ac4340dba3e03 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645360267; 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=7NxMeW+NcH8s9YMYPbdG+6QZN9Bt4Yq64op2VgWu4zM=; b=Gjk8qS4IvuQHxxcA/4CAMV4YkOalQIboE+Qd+eNv6NLlSP1A/J9Dw06auL3sLfTZTVfNfE MoWEeGwOKMpuqNe3tT55PJ3wOisvNNcrlH2XOGLGzUKayz4Ad0zY2N0dZ5myQIWEOSmfr9 etUSOD+pN+Tn0MiyLprQ2on+SRQcCRww+I5k6hShPSM00h5ud7udBbvpsmUu09j0LMmjNw R20aSTrOKW3XQ78pb1HoT0LMcR0zGg87aN9hCy4Di0VFudJgunOxI4m5Bgnj5LQiIJiSh3 y/dNSgNVuwKlG8BCpn/lfGo89w2cObOE/SylfrZteVCltlhcsdUDaPPOrbt10w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1645360267; a=rsa-sha256; cv=none; b=UsiPVKW7bGxN5BHOSbLIetM1Fygf0Xx26xdQlYXXxgVJpZ1uFIQP/kHSlzMeztd6wqXeMu KjDmnqwY8Cofsn9vZfH7CcBuvlACQUifvo9iMLOoip8NJ9ESe7j/B/mHkKAPTgvyFF+dFa PEsdp1JhQX2CJ8NQTBRrAMdjWPJA4Bx49di5SdTcmxTbdDIfvRQ/I/TGwcBdmg3m20qM8i HxcwhF84I7RyRf55pUVjDOGFjJvVX/1fsmw/r15tCxGo83PBxkf89LlupEGNGhfmuLnwLB 4TyN5y+VAk4C1ZLQ94/PN1lmcTTSJtCELWLcUL7jItXyoPBBd5z9GB5YCXipAw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=d378ddab79668c70d174bd20179ac4340dba3e03 commit d378ddab79668c70d174bd20179ac4340dba3e03 Author: John Baldwin AuthorDate: 2022-02-10 20:47:08 +0000 Commit: Dimitry Andric CommitDate: 2022-02-20 12:29:59 +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. (cherry picked from commit bbf4df1722060fb78939419476fb624114fb303d) --- lib/libthr/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/libthr/Makefile b/lib/libthr/Makefile index fab83d98ebe0..0b550d995241 100644 --- a/lib/libthr/Makefile +++ b/lib/libthr/Makefile @@ -29,6 +29,10 @@ CFLAGS.thr_stack.c+= -Wno-cast-align CFLAGS.rtld_malloc.c+= -Wno-cast-align CFLAGS.thr_symbols.c+= -Wno-missing-variable-declarations +.if ${MACHINE_CPUARCH} == "arm" +NO_THREAD_UNWIND_STACK= yes +.endif + .ifndef NO_THREAD_UNWIND_STACK CFLAGS+=-fexceptions CFLAGS+=-D_PTHREAD_FORCED_UNWIND