svn commit: r303318 - in stable/11/contrib/llvm/projects/libunwind: include src
Ed Maste
emaste at FreeBSD.org
Mon Jul 25 19:37:12 UTC 2016
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,
More information about the svn-src-stable
mailing list