From nobody Wed Dec 22 10:06:10 2021 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 5F11D1905EE6; Wed, 22 Dec 2021 10:06:17 +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 4JJpr70vVQz4Yl7; Wed, 22 Dec 2021 10:06:15 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 C34041B075; Wed, 22 Dec 2021 10:06:10 +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 1BMA6AmE092334; Wed, 22 Dec 2021 10:06:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BMA6A6n092333; Wed, 22 Dec 2021 10:06:10 GMT (envelope-from git) Date: Wed, 22 Dec 2021 10:06:10 GMT Message-Id: <202112221006.1BMA6A6n092333@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: c52a6b17f28d - stable/12 - After r364423, which ensures the callbacks that dl_iterate_phdr(3) performs are protected by an exclusive lock, even for statically linked programs, it is safe to re-enable libunwind's FrameHeaderCache, which I temporarily disabled in r364263. 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/12 X-Git-Reftype: branch X-Git-Commit: c52a6b17f28da03a928d477012ea942292f04fbe Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1640167575; 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=8N5/StHhNxSTqOE49VeVuT9IPfdEZ1fThKxrYzYRA28=; b=fkEzeNchDQ/fUmSjN54wVmfoJFwPdRU0Rfvx6rOGBzYe2AvqFoy16rIxNvT2Te8O1xE++v Vi82Wf81yZuWZk/NsgAtAuUexvDv/ZxAdJ0xM8y4Pl9PJBlfmI5U46IQ0CviQEIpO/obto SVa7k8Uy1AXJWdM5iup3Dm7gjxmKn4tlZ+zXBjHMYo3a6h+HYY6ll68sILLpKmKfHQ5VgN jN0RTLD97GIg6g4L/o/wjQPoJQ02C+EkVY0fCvlH2CmaGl9JT/pTUVtRvvTmlBoc0qON5A 8WFqVnrBiJjzdwrDwig5g2b/S4zmQq7/wldh/0BJNjncYiNGqJMbq6pTQzWVMA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1640167575; a=rsa-sha256; cv=none; b=ofYrc9pVjHqrBV6wEXCB2/LYuvGeOwy+zbT020QSk6Jg2swsugDaPedD4ChAT7PtQb/vFl Kg3kEf3Qf1mcMO+rRcPxX8xSI7V8dGSkpGF5sXATQ4X45loB7gz8DJ7sUi+dTnhW/35EZP ydweW2O29XK7kdIz4G+W4jsnGzxrf7LizbZMuS6afYpIHWD5a1vNx4zVajHKNX0CdbWlj7 7+jbvxYmUCHPV6j0PjDvPuvHfsfh8P/3SPzB+TnYFucSwkMfi0qA8Zk8poVyVdkQFAKAKy jJUQp5atKmpnCBt4pbjt9oobN8dao6sQ+nzQzjZTfCBw/kaTj01RqBwyfKF5KQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=c52a6b17f28da03a928d477012ea942292f04fbe commit c52a6b17f28da03a928d477012ea942292f04fbe Author: Dimitry Andric AuthorDate: 2020-08-25 20:07:11 +0000 Commit: Dimitry Andric CommitDate: 2021-12-22 10:01:14 +0000 After r364423, which ensures the callbacks that dl_iterate_phdr(3) performs are protected by an exclusive lock, even for statically linked programs, it is safe to re-enable libunwind's FrameHeaderCache, which I temporarily disabled in r364263. Meanwhile upstream has also used the _LIBUNWIND_USE_FRAME_HEADER_CACHE for this purpose, so the only thing needed is to add this as a compile-time command line flag. While here, reformat the CFLAGS lines a little bit. MFC after: 6 weeks X-MFC-With: r364284, r364423 (cherry picked from commit cc0b8830287282c96e26cd826383dc4794eb1268) --- lib/libgcc_eh/Makefile.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/libgcc_eh/Makefile.inc b/lib/libgcc_eh/Makefile.inc index 6e025921180a..4fe1eff406e1 100644 --- a/lib/libgcc_eh/Makefile.inc +++ b/lib/libgcc_eh/Makefile.inc @@ -25,7 +25,10 @@ CFLAGS.${file}+= -fno-exceptions -funwind-tables CXXFLAGS.${file}+= -fno-exceptions -funwind-tables .endfor -CFLAGS+= -I${UNWINDINCDIR} -I${.CURDIR} -D_LIBUNWIND_IS_NATIVE_ONLY +CFLAGS+= -I${UNWINDINCDIR} +CFLAGS+= -I${.CURDIR} +CFLAGS+= -D_LIBUNWIND_IS_NATIVE_ONLY +CFLAGS+= -D_LIBUNWIND_USE_FRAME_HEADER_CACHE CXXFLAGS+= -fno-rtti CXXSTD?= c++11 STATIC_CXXFLAGS+= -fvisibility=hidden -fPIC