From owner-svn-src-stable-11@freebsd.org Mon Jul 25 19:37:11 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB92BBA1630; Mon, 25 Jul 2016 19:37:11 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B6D341D14; Mon, 25 Jul 2016 19:37:11 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PJbAni059307; Mon, 25 Jul 2016 19:37:10 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PJbAum059304; Mon, 25 Jul 2016 19:37:10 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201607251937.u6PJbAum059304@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 25 Jul 2016 19:37:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303318 - in stable/11/contrib/llvm/projects/libunwind: include src X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 19:37:12 -0000 Author: emaste Date: Mon Jul 25 19:37:10 2016 New Revision: 303318 URL: https://svnweb.freebsd.org/changeset/base/303318 Log: Merge LLVM libunwind fixes r302475: libunwind: limit stack usage in unwind cursor This may be reworked upstream but in the interim should address the stack usage issue reported in the PR. r303061: libunwind: Properly align _Unwind_Exception. _Unwind_Exception is required to be double word aligned. GCC has interpreted this to mean "use the maximum useful alignment for the target" so follow that lead. PR: 206384 (r302475) Obtained from: LLVM review D22543 (r303061) Approved by: re (gjb) Modified: stable/11/contrib/llvm/projects/libunwind/include/__libunwind_config.h stable/11/contrib/llvm/projects/libunwind/include/unwind.h stable/11/contrib/llvm/projects/libunwind/src/DwarfParser.hpp Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/llvm/projects/libunwind/include/__libunwind_config.h ============================================================================== --- stable/11/contrib/llvm/projects/libunwind/include/__libunwind_config.h Mon Jul 25 19:18:42 2016 (r303317) +++ stable/11/contrib/llvm/projects/libunwind/include/__libunwind_config.h Mon Jul 25 19:37:10 2016 (r303318) @@ -22,30 +22,37 @@ # define _LIBUNWIND_TARGET_I386 1 # define _LIBUNWIND_CONTEXT_SIZE 8 # define _LIBUNWIND_CURSOR_SIZE 19 +# define _LIBUNWIND_MAX_REGISTER 9 # elif defined(__x86_64__) # define _LIBUNWIND_TARGET_X86_64 1 # define _LIBUNWIND_CONTEXT_SIZE 21 # define _LIBUNWIND_CURSOR_SIZE 33 +# define _LIBUNWIND_MAX_REGISTER 17 # elif defined(__ppc__) # define _LIBUNWIND_TARGET_PPC 1 # define _LIBUNWIND_CONTEXT_SIZE 117 # define _LIBUNWIND_CURSOR_SIZE 128 +# define _LIBUNWIND_MAX_REGISTER 113 # elif defined(__aarch64__) # define _LIBUNWIND_TARGET_AARCH64 1 # define _LIBUNWIND_CONTEXT_SIZE 66 # define _LIBUNWIND_CURSOR_SIZE 78 +# define _LIBUNWIND_MAX_REGISTER 96 # elif defined(__arm__) # define _LIBUNWIND_TARGET_ARM 1 # define _LIBUNWIND_CONTEXT_SIZE 60 # define _LIBUNWIND_CURSOR_SIZE 67 +# define _LIBUNWIND_MAX_REGISTER 96 # elif defined(__or1k__) # define _LIBUNWIND_TARGET_OR1K 1 # define _LIBUNWIND_CONTEXT_SIZE 16 # define _LIBUNWIND_CURSOR_SIZE 28 +# define _LIBUNWIND_MAX_REGISTER 32 # elif defined(__riscv__) # define _LIBUNWIND_TARGET_RISCV 1 # define _LIBUNWIND_CONTEXT_SIZE 128 /* XXX */ # define _LIBUNWIND_CURSOR_SIZE 140 /* XXX */ +# define _LIBUNWIND_MAX_REGISTER 96 # else # error "Unsupported architecture." # endif @@ -58,6 +65,7 @@ # define _LIBUNWIND_TARGET_OR1K 1 # define _LIBUNWIND_CONTEXT_SIZE 128 # define _LIBUNWIND_CURSOR_SIZE 140 +# define _LIBUNWIND_MAX_REGISTER 120 #endif // _LIBUNWIND_IS_NATIVE_ONLY #endif // ____LIBUNWIND_CONFIG_H__ Modified: stable/11/contrib/llvm/projects/libunwind/include/unwind.h ============================================================================== --- stable/11/contrib/llvm/projects/libunwind/include/unwind.h Mon Jul 25 19:18:42 2016 (r303317) +++ stable/11/contrib/llvm/projects/libunwind/include/unwind.h Mon Jul 25 19:37:10 2016 (r303318) @@ -128,7 +128,7 @@ struct _Unwind_Exception { // added for binary compatibility. uint32_t reserved[3]; #endif -}; +} __attribute__((__aligned__)); typedef _Unwind_Reason_Code (*_Unwind_Stop_Fn) (int version, Modified: stable/11/contrib/llvm/projects/libunwind/src/DwarfParser.hpp ============================================================================== --- stable/11/contrib/llvm/projects/libunwind/src/DwarfParser.hpp Mon Jul 25 19:18:42 2016 (r303317) +++ stable/11/contrib/llvm/projects/libunwind/src/DwarfParser.hpp Mon Jul 25 19:37:10 2016 (r303318) @@ -62,7 +62,7 @@ public: }; enum { - kMaxRegisterNumber = 120 + kMaxRegisterNumber = _LIBUNWIND_MAX_REGISTER }; enum RegisterSavedWhere { kRegisterUnused,