Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Jul 2016 19:37:10 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
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
Message-ID:  <201607251937.u6PJbAum059304@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201607251937.u6PJbAum059304>