Skip to content

Commit

Permalink
SERVER-61856 SERVER-42470 update libunwind to 1.6.2
Browse files Browse the repository at this point in the history
  • Loading branch information
dmoody256 authored and Evergreen Agent committed Mar 12, 2022
1 parent 2d35894 commit 6dd404e
Show file tree
Hide file tree
Showing 246 changed files with 5,574 additions and 1,633 deletions.
2 changes: 2 additions & 0 deletions README.third_party.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ a notice will be included in
| [timelib] | MIT | 2021.06 | ||
| [TomCrypt] | Public Domain | 1.18.2 |||
| [Unicode] | Unicode-DFS-2015 | 8.0.0 |||
| [libunwind] | MIT | 1.6.2 + changes | ||
| [Valgrind] | BSD-3-Clause<sup>\[<a href="#note_vg" id="ref_vg">1</a>]</sup> | 3.17.0 | ||
| [variant] | BSL-1.0 | 1.4.0 | ||
| [wiredtiger] | | <sup>\[<a href="#note_wt" id="ref_wt">2</a>]</sup> |||
Expand Down Expand Up @@ -81,6 +82,7 @@ a notice will be included in
[timelib]: https://github.com/derickr/timelib
[TomCrypt]: https://github.com/libtom/libtomcrypt/releases
[Unicode]: http:https://www.unicode.org/versions/enumeratedversions.html
[libunwind]: http:https://www.nongnu.org/libunwind/
[Valgrind]: http:https://valgrind.org/downloads/current.html
[variant]: https://github.com/mpark/variant
[wiredtiger]: https://github.com/wiredtiger/wiredtiger
Expand Down
4 changes: 2 additions & 2 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -1578,7 +1578,7 @@ use_system_libunwind = use_system_version_of_library("libunwind")
# Assume system libunwind works if it's installed and selected.
# Vendored libunwind, however, works only on linux-x86_64.
can_use_libunwind = (use_system_libunwind or
env.TargetOSIs('linux') and env['TARGET_ARCH'] == 'x86_64')
env.TargetOSIs('linux') and (env['TARGET_ARCH'] == 'x86_64' or env['TARGET_ARCH'] == 'aarch64'))

if use_libunwind == "off":
use_libunwind = False
Expand Down Expand Up @@ -4176,7 +4176,7 @@ def doConfigure(myenv):
conf.FindSysLibDep("unwind", ["unwind"])

if use_libunwind:
if not conf.CheckLib("lzma"):
if not conf.FindSysLibDep("lzma", ["lzma"]):
myenv.ConfError("Cannot find system library 'lzma' required for use with libunwind")

if use_system_version_of_library("intel_decimal128"):
Expand Down
22 changes: 22 additions & 0 deletions distsrc/THIRD-PARTY-NOTICES
Original file line number Diff line number Diff line change
Expand Up @@ -1590,4 +1590,26 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

29) License Notice for libunwind
------------------------------

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

End
2 changes: 0 additions & 2 deletions etc/third_party_components.yml
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,6 @@ components:
release_monitoring_id: 1748
local_directory_path: src/third_party/unwind
team_owner: "Service Architecture"
upgrade_suppression: TODO SERVER-61856
# Note: missing from README.third_party.md

"Mozilla Firefox":
homepage_url: https://www.mozilla.org/en-US/firefox/organizations/
Expand Down
6 changes: 4 additions & 2 deletions site_scons/libdeps.py
Original file line number Diff line number Diff line change
Expand Up @@ -1427,8 +1427,10 @@ def FindSysLibDep(context, name, libs, **kwargs):
context.did_show_result = 1
if result:
context.env[var] = lib
return context.Result(result)
context.Result(result)
return result
context.env[var] = _missing_syslib(name)
return context.Result(result)
context.Result(result)
return result

conf.AddTest("FindSysLibDep", FindSysLibDep)
4 changes: 2 additions & 2 deletions src/third_party/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,11 @@ if not use_system_version_of_library('kms-message'):

if use_system_libunwind:
thirdPartyEnvironmentModifications['unwind'] = {
'SYSLIBDEPS_PRIVATE' : [env['LIBDEPS_UNWIND_SYSLIBDEP'], 'lzma'],
'SYSLIBDEPS_PRIVATE' : [env['LIBDEPS_UNWIND_SYSLIBDEP'], env['LIBDEPS_LZMA_SYSLIBDEP']],
}
elif use_vendored_libunwind:
thirdPartyEnvironmentModifications['unwind'] = {
'SYSLIBDEPS_PRIVATE' : ['lzma'],
'SYSLIBDEPS_PRIVATE' : [env['LIBDEPS_LZMA_SYSLIBDEP']],
}

def injectThirdParty(thisEnv, libraries=[], parts=[]):
Expand Down
8 changes: 5 additions & 3 deletions src/third_party/unwind/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ env.Append(
CCFLAGS=[
'-fexceptions',
'-Wno-unused-result',
'-Wno-pointer-sign'
'-Wno-pointer-sign',
'-Wno-incompatible-pointer-types',
'-Wno-unused-variable',
])

if env.ToolchainIs('clang'):
Expand All @@ -117,10 +119,10 @@ env.Append(
# propagates to consumers that Inject (depend on) unwind.
env.RegisterConsumerModifications(
CPPPATH=[unwind_platform.Dir("install/include")],
SYSLIBDEPS_PRIVATE=['lzma'])
SYSLIBDEPS_PRIVATE=[env['LIBDEPS_LZMA_SYSLIBDEP']])

env.Append(
SYSLIBDEPS_PRIVATE=['lzma'])
SYSLIBDEPS_PRIVATE=[env['LIBDEPS_LZMA_SYSLIBDEP']])

env.Append(
CPPDEFINES=[
Expand Down
52 changes: 2 additions & 50 deletions src/third_party/unwind/dist/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,55 +1,7 @@
***********************************************************

Discontinued. See git log instead at
Discontinued. See git log instead at

http:https://www.kernel.org/git/gitweb.cgi?p=libs/libunwind/libunwind.git;a=log
https:https://github.com/libunwind/libunwind/commits/master

***********************************************************

2002-11-08 David Mosberger-Tang <[email protected]>

* src/ia64/unwind_i.h (ia64_getfp): Change from macro to inline
function. Check "loc" argument for being NULL before dereferencing it.
(ia64_putfp): Ditto.
(ia64_get): Ditto.
(ia64_put): Ditto.

2002-01-18 David Mosberger-Tang <[email protected]>

* src/ia64/parser.c (__ia64_unw_create_state_record): Set
IA64_FLAG_HAS_HANDLER if the unwind info descriptors indicate that
there a handler.

* src/ia64/regs.c (__ia64_access_reg): Return zero for UNW_REG_HANDLER
in frames that don't have a personality routine.

* src/ia64/unwind_i.h (IA64_FLAG_HAS_HANDLER): New flag.

* src/ia64/regs.c (__ia64_access_reg): When reading UNW_REG_HANDLER,
account for the fact that the personality address is gp-relative.

* src/ia64/parser.c (__ia64_unw_create_state_record): Fix
initialization of segbase and len.

2002-01-17 David Mosberger-Tang <[email protected]>

* include/unwind-ia64.h: Include via "unwind.h" to ensure
the file is picked up from same directory.

2002-01-16 David Mosberger-Tang <[email protected]>

* include/unwind.h: Define UNW_ESTOPUNWIND. This error code may
be returned by acquire_unwind_info() to force termination of
unwinding. An application may want to do this when encountering a
call frame for dynamically generated code, for example.

* unwind.h: Pass opaque argument pointer to acquire_unwind_info()
and release_unwind_info() like we do for access_mem() etc.

2002-01-14 David Mosberger-Tang <[email protected]>

* Version 0.0 released.

2002-01-11 David Mosberger-Tang <[email protected]>

* ChangeLog created.
10 changes: 9 additions & 1 deletion src/third_party/unwind/dist/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,15 @@ endif
if ARCH_S390X
include_HEADERS += include/libunwind-s390x.h
endif
if ARCH_RISCV
include_HEADERS += include/libunwind-riscv.h
endif

if !REMOTE_ONLY
include_HEADERS += include/libunwind.h include/unwind.h
include_HEADERS += include/libunwind.h
if BUILD_UNWIND_HEADER
include_HEADERS += include/unwind.h
endif
endif

nodist_include_HEADERS = include/libunwind-common.h
Expand Down Expand Up @@ -89,6 +95,8 @@ noinst_HEADERS = include/dwarf.h include/dwarf_i.h include/dwarf-eh.h \
include/tdep-sh/jmpbuf.h include/tdep-sh/libunwind_i.h \
include/tdep-s390x/dwarf-config.h \
include/tdep-s390x/jmpbuf.h include/tdep-s390x/libunwind_i.h \
include/tdep-riscv/dwarf-config.h \
include/tdep-riscv/jmpbuf.h include/tdep-riscv/libunwind_i.h \
include/tdep/libunwind_i.h \
include/tdep/jmpbuf.h include/tdep/dwarf-config.h

Expand Down
17 changes: 11 additions & 6 deletions src/third_party/unwind/dist/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,11 @@ target_triplet = @target@
@ARCH_PPC64_TRUE@am__append_12 = include/libunwind-ppc64.h
@ARCH_SH_TRUE@am__append_13 = include/libunwind-sh.h
@ARCH_S390X_TRUE@am__append_14 = include/libunwind-s390x.h
@REMOTE_ONLY_FALSE@am__append_15 = include/libunwind.h include/unwind.h
@CONFIG_TESTS_TRUE@am__append_16 = tests
@CONFIG_DOCS_TRUE@am__append_17 = doc
@ARCH_RISCV_TRUE@am__append_15 = include/libunwind-riscv.h
@REMOTE_ONLY_FALSE@am__append_16 = include/libunwind.h
@BUILD_UNWIND_HEADER_TRUE@@REMOTE_ONLY_FALSE@am__append_17 = include/unwind.h
@CONFIG_TESTS_TRUE@am__append_18 = tests
@CONFIG_DOCS_TRUE@am__append_19 = doc
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
Expand Down Expand Up @@ -159,7 +161,7 @@ am__include_HEADERS_DIST = include/libunwind-dynamic.h \
include/libunwind-x86.h include/libunwind-x86_64.h \
include/libunwind-ppc32.h include/libunwind-ppc64.h \
include/libunwind-sh.h include/libunwind-s390x.h \
include/libunwind.h include/unwind.h
include/libunwind-riscv.h include/libunwind.h include/unwind.h
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
Expand Down Expand Up @@ -427,9 +429,10 @@ include_HEADERS = include/libunwind-dynamic.h $(am__append_1) \
$(am__append_5) $(am__append_6) $(am__append_7) \
$(am__append_8) $(am__append_9) $(am__append_10) \
$(am__append_11) $(am__append_12) $(am__append_13) \
$(am__append_14) $(am__append_15)
$(am__append_14) $(am__append_15) $(am__append_16) \
$(am__append_17)
nodist_include_HEADERS = include/libunwind-common.h
SUBDIRS = src $(am__append_16) $(am__append_17)
SUBDIRS = src $(am__append_18) $(am__append_19)
noinst_HEADERS = include/dwarf.h include/dwarf_i.h include/dwarf-eh.h \
include/compiler.h include/libunwind_i.h include/mempool.h \
include/remote.h \
Expand Down Expand Up @@ -458,6 +461,8 @@ noinst_HEADERS = include/dwarf.h include/dwarf_i.h include/dwarf-eh.h \
include/tdep-sh/jmpbuf.h include/tdep-sh/libunwind_i.h \
include/tdep-s390x/dwarf-config.h \
include/tdep-s390x/jmpbuf.h include/tdep-s390x/libunwind_i.h \
include/tdep-riscv/dwarf-config.h \
include/tdep-riscv/jmpbuf.h include/tdep-riscv/libunwind_i.h \
include/tdep/libunwind_i.h \
include/tdep/jmpbuf.h include/tdep/dwarf-config.h

Expand Down
10 changes: 6 additions & 4 deletions src/third_party/unwind/dist/README
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,22 @@

[![Build Status](https://travis-ci.org/libunwind/libunwind.svg?branch=master)](https://travis-ci.org/libunwind/libunwind)

This is version 1.5 of the unwind library. This library supports
several architecture/operating-system combinations:
This library supports several architecture/operating-system combinations:

| System | Architecture | Status |
| :------ | :----------- | :----- |
| Linux | x86-64 | ✓ |
| Linux | x86 | ✓ |
| Linux | ARM | ✓ |
| Linux | AArch64 | ✓ |
| Linux | PPC32 | ✓ |
| Linux | PPC64 | ✓ |
| Linux | SuperH | ✓ |
| Linux | IA-64 | ✓ |
| Linux | PARISC | Works well, but C library missing unwind-info |
| Linux | Tilegx | 64-bit mode only |
| Linux | MIPS | Newly added |
| Linux | RISC-V | 64-bit only |
| HP-UX | IA-64 | Mostly works, but known to have serious limitations |
| FreeBSD | x86-64 | ✓ |
| FreeBSD | x86 | ✓ |
Expand All @@ -34,7 +35,7 @@ such dependencies
- p, provides its own implementation
- empty, no requirement

| Archtecture | getcontext | setcontext |
| Architecture | getcontext | setcontext |
|--------------|------------|------------|
| aarch64 | p | |
| arm | p | |
Expand All @@ -43,6 +44,7 @@ such dependencies
| mips | p | |
| ppc32 | r | |
| ppc64 | r | r |
| riscv | p | p |
| s390x | p | p |
| sh | r | |
| tilegx | r | r |
Expand All @@ -54,7 +56,7 @@ such dependencies
In general, this library can be built and installed with the following
commands:

$ ./autogen.sh # Needed only for building from git. Depends on libtool.
$ autoreconf -i # Needed only for building from git. Depends on libtool.
$ ./configure
$ make
$ make install prefix=PREFIX
Expand Down
31 changes: 0 additions & 31 deletions src/third_party/unwind/dist/acinclude.m4
Original file line number Diff line number Diff line change
@@ -1,32 +1 @@
AC_DEFUN([LIBUNWIND___THREAD],
[dnl Check whether the compiler supports the __thread keyword.
if test "x$enable___thread" != xno; then
AC_CACHE_CHECK([for __thread], libc_cv_gcc___thread,
[cat > conftest.c <<\EOF
__thread int a = 42;
EOF
if AC_TRY_COMMAND([${CC-cc} $CFLAGS -c conftest.c >&AS_MESSAGE_LOG_FD]); then
libc_cv_gcc___thread=yes
else
libc_cv_gcc___thread=no
fi
rm -f conftest*])
if test "$libc_cv_gcc___thread" = yes; then
AC_DEFINE(HAVE___THREAD, 1,
[Define to 1 if __thread keyword is supported by the C compiler.])
fi
else
libc_cv_gcc___thread=no
fi])

AC_DEFUN([CHECK_ATOMIC_OPS],
[dnl Check whether the system has the atomic_ops package installed.
AC_CHECK_HEADERS(atomic_ops.h)
#
# Don't link against libatomic_ops for now. We don't want libunwind
# to depend on libatomic_ops.so. Fortunately, none of the platforms
# we care about so far need libatomic_ops.a (everything is done via
# inline macros).
#
# AC_CHECK_LIB(atomic_ops, main)
])
Loading

0 comments on commit 6dd404e

Please sign in to comment.