From owner-svn-src-head@freebsd.org Sat Jul 9 00:35:22 2016 Return-Path: Delivered-To: svn-src-head@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 00328B826E8; Sat, 9 Jul 2016 00:35:22 +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 B78551CBC; Sat, 9 Jul 2016 00:35:21 +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 u690ZKuu045663; Sat, 9 Jul 2016 00:35:20 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u690ZKNb045661; Sat, 9 Jul 2016 00:35:20 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201607090035.u690ZKNb045661@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 9 Jul 2016 00:35:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302475 - in head/contrib/llvm/projects/libunwind: include src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jul 2016 00:35:22 -0000 Author: emaste Date: Sat Jul 9 00:35:20 2016 New Revision: 302475 URL: https://svnweb.freebsd.org/changeset/base/302475 Log: 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. PR: 206384 MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/contrib/llvm/projects/libunwind/include/__libunwind_config.h head/contrib/llvm/projects/libunwind/src/DwarfParser.hpp Modified: head/contrib/llvm/projects/libunwind/include/__libunwind_config.h ============================================================================== --- head/contrib/llvm/projects/libunwind/include/__libunwind_config.h Fri Jul 8 23:44:09 2016 (r302474) +++ head/contrib/llvm/projects/libunwind/include/__libunwind_config.h Sat Jul 9 00:35:20 2016 (r302475) @@ -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: head/contrib/llvm/projects/libunwind/src/DwarfParser.hpp ============================================================================== --- head/contrib/llvm/projects/libunwind/src/DwarfParser.hpp Fri Jul 8 23:44:09 2016 (r302474) +++ head/contrib/llvm/projects/libunwind/src/DwarfParser.hpp Sat Jul 9 00:35:20 2016 (r302475) @@ -62,7 +62,7 @@ public: }; enum { - kMaxRegisterNumber = 120 + kMaxRegisterNumber = _LIBUNWIND_MAX_REGISTER }; enum RegisterSavedWhere { kRegisterUnused,