commit llvm for openSUSE:Factory
Hello community,
here is the log from the commit of package llvm for openSUSE:Factory checked in at 2016-09-16 10:59:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/llvm (Old)
and /work/SRC/openSUSE:Factory/.llvm.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "llvm"
Changes:
--------
--- /work/SRC/openSUSE:Factory/llvm/lldb.changes 2016-08-28 12:17:35.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.llvm.new/lldb.changes 2016-09-16 10:59:32.000000000 +0200
@@ -1,0 +2,54 @@
+Wed Sep 7 10:01:47 UTC 2016 - tchvatal@suse.com
+
+- Sort out with spec-cleaner
+
+-------------------------------------------------------------------
+Thu Aug 31 20:36:58 UTC 2016 - toddrme2178@gmail.com
+
+- Update to llvm 3.8.1
+ * See http://llvm.org/releases/3.8.1/docs/ReleaseNotes.html and
+ http://llvm.org/releases/3.8.1/tools/docs/ReleaseNotes.html
+- Use versioned libLLVM (to libLLVM3_8) and libclang (to libclang3_8)
+- Change versioning of liblldb3_8 to liblldb-3_8 and use a variable
+ to control the name instead of hard-coding it.
+- Use bcond_with and bcond_without to enable/disable build options
+ instead of hard-coding them.
+- Put buildrequires as requires in -devel packages to avoid linker errors
+ when building packages against the -devel packages.
+- Add ffi support (disabled by default).
+- Add oprofile support (disabled by default).
+- Add valgrind support (disabled by default).
+- Link cmake files to the normal cmake file directory to allow autodetection
+ of cmake interfaces.
+- Remove unused lldb components from main spec file.
+- Split llvm python bindings into own subpackage.
+- Split emacs plugin into own subpackage
+- Move additional vim plugins into vim plugins package
+- Split libc++, libLTO, LLVMgold, libomp, clang-chekers into own subpackages
+- Make python-clang, llvm-vim-plugins, and llvm-emacs-plugins noarch since
+ they aren't architecture-specific.
+- Make packages besides llvm, llvm-clang, and the shared libraries conflict
+ with other versions. This will be important when multiple LLVM versions
+ are supported.
+- Various spec file cleanups
+- Rebase patches:
+ * arm_suse_support.diff
+ * assume-opensuse.patch
+ * clang-resourcedirs.patch
+ * default-to-i586.patch
+ * glibc-2.23-libcxx.patch
+ * glibc-2.24-libcxx.patch
+ * lldb-add-pthread-dl-libs.patch
+ * lldb-cmake.patch
+ * llvm-fix-find-gcc5-install.patch
+ * llvm-nonvoid-return.patch
+ * llvm-remove-clang-only-flags.patch
+ * revert-cmake-soname.patch
+ * set-revision.patch
+
+-------------------------------------------------------------------
+Wed Aug 31 10:24:31 UTC 2016 - tchvatal@suse.com
+
+- Convert to use %cmake macros
+
+-------------------------------------------------------------------
--- /work/SRC/openSUSE:Factory/llvm/llvm.changes 2016-08-06 20:37:48.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.llvm.new/llvm.changes 2016-09-16 10:59:32.000000000 +0200
@@ -1,0 +2,60 @@
+Wed Sep 7 10:05:32 UTC 2016 - tchvatal@suse.com
+
+- Sort a bit with spec-cleaner
+- Remove the latest switch for now, things should be either coinstallable
+ or not, we don't need to bother around with compilation like this
+
+-------------------------------------------------------------------
+Thu Aug 31 20:36:58 UTC 2016 - toddrme2178@gmail.com
+
+- Update to llvm 3.8.1
+ * See http://llvm.org/releases/3.8.1/docs/ReleaseNotes.html and
+ http://llvm.org/releases/3.8.1/tools/docs/ReleaseNotes.html
+- Use versioned libLLVM (to libLLVM3_8) and libclang (to libclang3_8)
+- Change versioning of liblldb3_8 to liblldb-3_8 and use a variable
+ to control the name instead of hard-coding it.
+- Use bcond_with and bcond_without to enable/disable build options
+ instead of hard-coding them.
+- Put buildrequires as requires in -devel packages to avoid linker errors
+ when building packages against the -devel packages.
+- Add ffi support (disabled by default).
+- Add oprofile support (disabled by default).
+- Add valgrind support (disabled by default).
+- Link cmake files to the normal cmake file directory to allow autodetection
+ of cmake interfaces.
+- Remove unused lldb components from main spec file.
+- Split llvm python bindings into own subpackage.
+- Split emacs plugin into own subpackage
+- Move additional vim plugins into vim plugins package
+- Split libc++, libLTO, LLVMgold, libomp, clang-chekers into own subpackages
+- Make python-clang, llvm-vim-plugins, and llvm-emacs-plugins noarch since
+ they aren't architecture-specific.
+- Make packages besides llvm, llvm-clang, and the shared libraries conflict
+ with other versions. This will be important when multiple LLVM versions
+ are supported.
+- Various spec file cleanups
+- Rebase patches:
+ * arm_suse_support.diff
+ * assume-opensuse.patch
+ * clang-resourcedirs.patch
+ * default-to-i586.patch
+ * glibc-2.23-libcxx.patch
+ * glibc-2.24-libcxx.patch
+ * lldb-add-pthread-dl-libs.patch
+ * lldb-cmake.patch
+ * llvm-fix-find-gcc5-install.patch
+ * llvm-nonvoid-return.patch
+ * llvm-remove-clang-only-flags.patch
+ * revert-cmake-soname.patch
+ * set-revision.patch
+
+-------------------------------------------------------------------
+Fri Aug 26 10:03:56 UTC 2016 - tchvatal@suse.com
+
+- Start conversion to use cmake macros with now introduced
+ compatibility for ninja
+- Reduce number of threads if we don't have enough memory
+- Add patch for the nonvoid returns:
+ * llvm-nonvoid-return.patch
+
+-------------------------------------------------------------------
Old:
----
cfe-3.8.0.src.tar.xz
cfe-docs-3.8.0.src.tar.xz
clang-tools-extra-3.8.0.src.tar.xz
compiler-rt-3.8.0.src.tar.xz
libcxx-3.8.0.src.tar.xz
libcxxabi-3.8.0.src.tar.xz
lldb-3.8.0.src.tar.xz
llvm-3.8.0.src.tar.xz
llvm-docs-3.8.0.src.tar.xz
openmp-3.8.0.src.tar.xz
New:
----
cfe-3.8.1.src.tar.xz
cfe-docs-3.8.1.src.tar.xz
clang-tools-extra-3.8.1.src.tar.xz
compiler-rt-3.8.1.src.tar.xz
libcxx-3.8.1.src.tar.xz
libcxxabi-3.8.1.src.tar.xz
lldb-3.8.1.src.tar.xz
llvm-3.8.1.src.tar.xz
llvm-docs-3.8.1.src.tar.xz
llvm-nonvoid-return.patch
openmp-3.8.1.src.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ lldb.spec ++++++
--- /var/tmp/diff_new_pack.19DKHl/_old 2016-09-16 10:59:35.000000000 +0200
+++ /var/tmp/diff_new_pack.19DKHl/_new 2016-09-16 10:59:35.000000000 +0200
@@ -16,9 +16,10 @@
#
-%define _revision 262553
+%define _sonum 3_8
+%define _revsn 273405
Name: lldb
-Version: 3.8.0
+Version: 3.8.1
Release: 0
Summary: Software debugger built using LLVM libraries
License: NCSA
@@ -33,18 +34,20 @@
Patch2: lldb-add-pthread-dl-libs.patch
BuildRequires: cmake
BuildRequires: fdupes
-BuildRequires: libedit-devel
-BuildRequires: libffi-devel
-BuildRequires: libxml2-devel
-BuildRequires: llvm-clang-devel = %{version}
-BuildRequires: llvm-devel = %{version}
+BuildRequires: llvm-gold
BuildRequires: ncurses-devel
BuildRequires: ninja
-BuildRequires: python-devel
+BuildRequires: pkgconfig
BuildRequires: swig
-BuildRequires: zlib-devel
-Requires: libLLVM = %{version}
-Requires: libclang = %{version}
+BuildRequires: cmake(Clang) = %{version}
+BuildRequires: cmake(LLVM) = %{version}
+BuildRequires: pkgconfig(libedit)
+BuildRequires: pkgconfig(libffi)
+BuildRequires: pkgconfig(libxml-2.0)
+BuildRequires: pkgconfig(python2)
+BuildRequires: pkgconfig(zlib)
+# Avoid multiple provider errors
+Requires: liblldb%{_sonum} = %{version}
Requires: python
Requires: python-six
ExclusiveArch: arm x86_64
@@ -55,23 +58,42 @@
larger LLVM Project, such as the Clang expression parser and LLVM
disassembler.
-%package -n liblldb3_8
+%package -n liblldb%{_sonum}
Summary: LLDB software debugger runtime library
Group: System/Libraries
+# Avoid multiple provider errors
+Requires: libLLVM%{_sonum} = %{version}
+Requires: libclang%{_sonum} = %{version}
-%description -n liblldb3_8
+%description -n liblldb%{_sonum}
This subpackage contains the main LLDB component.
%package devel
Summary: Development files for LLDB
Group: Development/Languages/Other
-Requires: libedit-devel
-Requires: liblldb3_8 = %{version}
-Requires: zlib-devel
+Requires: cmake
+Requires: liblldb%{_sonum} = %{version}
+Requires: ncurses-devel
+Requires: swig
+Requires: cmake(Clang) = %{version}
+Requires: cmake(LLVM) = %{version}
+Requires: pkgconfig(libedit)
+Requires: pkgconfig(libffi)
+Requires: pkgconfig(libxml-2.0)
+Requires: pkgconfig(zlib)
%description devel
This package contains the development files for LLDB.
+%package -n python-lldb
+Summary: Python bindings for liblldb
+Group: Development/Languages/Python
+Requires: liblldb%{_sonum} = %{version}
+Requires: python
+
+%description -n python-lldb
+This package contains the Python bindings to clang (C language) frontend for LLVM.
+
%prep
%setup -q -n %{name}-%{version}.src
%patch0 -p1
@@ -79,42 +101,35 @@
%patch2 -p1
# Set LLDB revision
-sed -i s,LLDB_REVISION,\"%{_revision}\",g source/lldb.cpp #"
+sed -i s,LLDB_REVISION,\"%{_revsn}\",g source/lldb.cpp #"
%build
-mkdir build
-pushd build
-
-cmake -DCMAKE_C_COMPILER=clang \
+%define __builder ninja
+%cmake \
+ -DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
-DBUILD_SHARED_LIBS=OFF \
- -DCMAKE_INSTALL_PREFIX=%{_prefix} \
- -DCMAKE_BUILD_TYPE=Release \
- %if "%{_lib}" == "lib64"
+%if "%{_lib}" == "lib64"
-DLLVM_LIBDIR_SUFFIX=64 \
- %endif
+%endif
-DLLVM_RUNTIME_OUTPUT_INTDIR=$PWD/bin \
-DLLVM_LIBRARY_OUTPUT_INTDIR=$PWD/%{_lib} \
-DPYTHON_VERSION_MAJOR=%{py_major} \
- -DPYTHON_VERSION_MINOR=%{py_minor} \
- -G "Ninja" \
- ..
-
-ninja
+ -DPYTHON_VERSION_MINOR=%{py_minor}
+%make_jobs
%install
-pushd build
-DESTDIR=%{buildroot} ninja install
+%cmake_install
# Python: fix binary libraries location.
-rm %{buildroot}%{py_sitedir}/lldb/_lldb.so
+rm %{buildroot}%{python_sitearch}/lldb/_lldb.so
liblldb=$(basename $(readlink -e %{buildroot}%{_libdir}/liblldb.so))
ln -vsf "../../../${liblldb}" %{buildroot}%{python_sitearch}/lldb/_lldb.so
ln -vsf "../../${liblldb}" %{buildroot}%{python_sitearch}/_lldb.so
# Remove bundled six.py.
-rm -f %{buildroot}%{py_sitedir}/six.*
+rm -f %{buildroot}%{python_sitearch}/six.*
# Remove static libraries.
rm %{buildroot}%{_libdir}/liblldb*.a
@@ -122,23 +137,41 @@
# Fix duplicated files.
%fdupes %{_includedir}/%{name}/Host/
-%post -n liblldb3_8 -p /sbin/ldconfig
-%postun -n liblldb3_8 -p /sbin/ldconfig
+mkdir -p %{buildroot}%{_libdir}/cmake/lldb/
+cp cmake/modules/*.cmake %{buildroot}%{_libdir}/cmake/lldb/
+
+# Make consistent with the rest of the executables
+mv %{buildroot}%{_bindir}/lldb-argdumper %{buildroot}%{_bindir}/lldb-argdumper-%{version}
+ln -s %{_bindir}/lldb-argdumper-%{version} %{buildroot}%{_bindir}/lldb-argdumper
+
+%post -n liblldb%{_sonum} -p /sbin/ldconfig
+%postun -n liblldb%{_sonum} -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
-%{_bindir}/lldb*
-%{py_sitedir}/_lldb.so
-%{py_sitedir}/lldb
-%{py_sitedir}/readline.so
+%{_bindir}/lldb
+%{_bindir}/lldb-argdumper
+%{_bindir}/lldb-mi
+%{_bindir}/lldb-server
+%{_bindir}/lldb-%{version}
+%{_bindir}/lldb-argdumper-%{version}
+%{_bindir}/lldb-mi-%{version}
+%{_bindir}/lldb-server-%{version}
+
+%files -n python-lldb
+%defattr(-,root,root)
+%{python_sitearch}/_lldb.so
+%{python_sitearch}/lldb/
+%{python_sitearch}/readline.so
-%files -n liblldb3_8
+%files -n liblldb%{_sonum}
%defattr(-,root,root)
%{_libdir}/liblldb.so.*
%files devel
%defattr(-,root,root,-)
-%{_includedir}/lldb
+%{_libdir}/cmake/lldb/
+%{_includedir}/lldb/
%{_libdir}/liblldb.so
%changelog
++++++ llvm.spec ++++++
++++ 911 lines (skipped)
++++ between /work/SRC/openSUSE:Factory/llvm/llvm.spec
++++ and /work/SRC/openSUSE:Factory/.llvm.new/llvm.spec
++++++ _constraints ++++++
--- /var/tmp/diff_new_pack.19DKHl/_old 2016-09-16 10:59:35.000000000 +0200
+++ /var/tmp/diff_new_pack.19DKHl/_new 2016-09-16 10:59:35.000000000 +0200
@@ -1,6 +1,9 @@
<?xml version="1.0"?>
<constraints>
<hardware>
+ <disk>
+ <size unit="G">20</size>
+ </disk>
<memory>
<size unit="M">4000</size>
</memory>
++++++ arm_suse_support.diff ++++++
--- /var/tmp/diff_new_pack.19DKHl/_old 2016-09-16 10:59:35.000000000 +0200
+++ /var/tmp/diff_new_pack.19DKHl/_new 2016-09-16 10:59:35.000000000 +0200
@@ -1,7 +1,7 @@
-Index: cfe-3.8.0.src/lib/Driver/ToolChains.cpp
+Index: cfe-3.8.1.src/lib/Driver/ToolChains.cpp
===================================================================
---- cfe-3.8.0.src/lib/Driver/ToolChains.cpp.orig
-+++ cfe-3.8.0.src/lib/Driver/ToolChains.cpp
+--- cfe-3.8.1.src/lib/Driver/ToolChains.cpp.orig
++++ cfe-3.8.1.src/lib/Driver/ToolChains.cpp
@@ -1418,7 +1418,7 @@ bool Generic_GCC::GCCInstallationDetecto
static const char *const AArch64LibDirs[] = {"/lib64", "/lib"};
static const char *const AArch64Triples[] = {
++++++ assume-opensuse.patch ++++++
--- /var/tmp/diff_new_pack.19DKHl/_old 2016-09-16 10:59:35.000000000 +0200
+++ /var/tmp/diff_new_pack.19DKHl/_new 2016-09-16 10:59:35.000000000 +0200
@@ -1,7 +1,7 @@
-Index: cfe-3.8.0.src/lib/Driver/ToolChains.cpp
+Index: cfe-3.8.1.src/lib/Driver/ToolChains.cpp
===================================================================
---- cfe-3.8.0.src/lib/Driver/ToolChains.cpp.orig
-+++ cfe-3.8.0.src/lib/Driver/ToolChains.cpp
+--- cfe-3.8.1.src/lib/Driver/ToolChains.cpp.orig
++++ cfe-3.8.1.src/lib/Driver/ToolChains.cpp
@@ -3422,6 +3422,7 @@ static bool IsUbuntu(enum Distro Distro)
}
++++++ baselibs.conf ++++++
--- /var/tmp/diff_new_pack.19DKHl/_old 2016-09-16 10:59:35.000000000 +0200
+++ /var/tmp/diff_new_pack.19DKHl/_new 2016-09-16 10:59:35.000000000 +0200
@@ -1,3 +1,4 @@
-libLLVM
-libclang
-
+libLLVM3_8
+libclang3_8
+llvm-devel
+clang-devel
++++++ cfe-3.8.0.src.tar.xz -> cfe-3.8.1.src.tar.xz ++++++
/work/SRC/openSUSE:Factory/llvm/cfe-3.8.0.src.tar.xz /work/SRC/openSUSE:Factory/.llvm.new/cfe-3.8.1.src.tar.xz differ: char 25, line 1
++++++ cfe-docs-3.8.0.src.tar.xz -> cfe-docs-3.8.1.src.tar.xz ++++++
++++ 7815 lines of diff (skipped)
++++++ clang-resourcedirs.patch ++++++
--- /var/tmp/diff_new_pack.19DKHl/_old 2016-09-16 10:59:36.000000000 +0200
+++ /var/tmp/diff_new_pack.19DKHl/_new 2016-09-16 10:59:36.000000000 +0200
@@ -1,7 +1,7 @@
-Index: cfe-3.8.0.src/lib/Driver/Driver.cpp
+Index: cfe-3.8.1.src/lib/Driver/Driver.cpp
===================================================================
---- cfe-3.8.0.src/lib/Driver/Driver.cpp
-+++ cfe-3.8.0.src/lib/Driver/Driver.cpp
+--- cfe-3.8.1.src/lib/Driver/Driver.cpp
++++ cfe-3.8.1.src/lib/Driver/Driver.cpp
@@ -64,7 +64,7 @@ Driver::Driver(StringRef ClangExecutable
// Compute the path to the resource directory.
++++++ clang-tools-extra-3.8.0.src.tar.xz -> clang-tools-extra-3.8.1.src.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clang-tools-extra-3.8.0.src/test/Unit/lit.site.cfg.in new/clang-tools-extra-3.8.1.src/test/Unit/lit.site.cfg.in
--- old/clang-tools-extra-3.8.0.src/test/Unit/lit.site.cfg.in 2014-08-13 14:54:50.000000000 +0200
+++ new/clang-tools-extra-3.8.1.src/test/Unit/lit.site.cfg.in 2016-06-01 02:27:34.000000000 +0200
@@ -6,10 +6,4 @@
config.shlibdir = "@SHLIBDIR@"
config.target_triple = "@TARGET_TRIPLE@"
-# Make sure any custom vars defined above that are required in lit.local.cfg
-# files are made available.
-def on_clone(parent, clone, path):
- clone.extra_tools_src_dir = parent.extra_tools_src_dir
-
-config.on_clone = on_clone
lit_config.load_config(config, "@CLANG_TOOLS_SOURCE_DIR@/test/Unit/lit.cfg")
++++++ compiler-rt-3.8.0.src.tar.xz -> compiler-rt-3.8.1.src.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compiler-rt-3.8.0.src/cmake/config-ix.cmake new/compiler-rt-3.8.1.src/cmake/config-ix.cmake
--- old/compiler-rt-3.8.0.src/cmake/config-ix.cmake 2016-02-03 18:13:25.000000000 +0100
+++ new/compiler-rt-3.8.1.src/cmake/config-ix.cmake 2016-05-25 07:49:40.000000000 +0200
@@ -293,8 +293,8 @@
set(ALL_TSAN_SUPPORTED_ARCH ${X86_64} ${MIPS64} ${ARM64} ${PPC64})
set(ALL_UBSAN_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64}
${MIPS32} ${MIPS64} ${PPC64})
-set(ALL_SAFESTACK_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM64})
-set(ALL_CFI_SUPPORTED_ARCH ${X86} ${X86_64})
+set(ALL_SAFESTACK_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM64} ${MIPS32} ${MIPS64})
+set(ALL_CFI_SUPPORTED_ARCH ${X86} ${X86_64} ${MIPS64})
if(APPLE)
include(CompilerRTDarwinUtils)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compiler-rt-3.8.0.src/lib/asan/asan_stack.h new/compiler-rt-3.8.1.src/lib/asan/asan_stack.h
--- old/compiler-rt-3.8.0.src/lib/asan/asan_stack.h 2015-10-01 02:22:21.000000000 +0200
+++ new/compiler-rt-3.8.1.src/lib/asan/asan_stack.h 2016-05-25 07:57:29.000000000 +0200
@@ -48,7 +48,10 @@
uptr stack_top = t->stack_top();
uptr stack_bottom = t->stack_bottom();
ScopedUnwinding unwind_scope(t);
- stack->Unwind(max_depth, pc, bp, context, stack_top, stack_bottom, fast);
+ if (!SANITIZER_MIPS || IsValidFrame(bp, stack_top, stack_bottom)) {
+ stack->Unwind(max_depth, pc, bp, context, stack_top, stack_bottom,
+ fast);
+ }
} else if (!t && !fast) {
/* If GetCurrentThread() has failed, try to do slow unwind anyways. */
stack->Unwind(max_depth, pc, bp, context, 0, 0, false);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compiler-rt-3.8.0.src/lib/lsan/lsan.h new/compiler-rt-3.8.1.src/lib/lsan/lsan.h
--- old/compiler-rt-3.8.0.src/lib/lsan/lsan.h 2014-10-26 04:35:14.000000000 +0100
+++ new/compiler-rt-3.8.1.src/lib/lsan/lsan.h 2016-05-25 07:57:29.000000000 +0200
@@ -24,8 +24,11 @@
stack_top = t->stack_end(); \
stack_bottom = t->stack_begin(); \
} \
- stack.Unwind(max_size, StackTrace::GetCurrentPc(), GET_CURRENT_FRAME(), \
- /* context */ 0, stack_top, stack_bottom, fast); \
+ if (!SANITIZER_MIPS || \
+ IsValidFrame(GET_CURRENT_FRAME(), stack_top, stack_bottom)) { \
+ stack.Unwind(max_size, StackTrace::GetCurrentPc(), GET_CURRENT_FRAME(), \
+ /* context */ 0, stack_top, stack_bottom, fast); \
+ } \
}
#define GET_STACK_TRACE_FATAL \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compiler-rt-3.8.0.src/lib/msan/msan.cc new/compiler-rt-3.8.1.src/lib/msan/msan.cc
--- old/compiler-rt-3.8.0.src/lib/msan/msan.cc 2015-12-14 15:15:32.000000000 +0100
+++ new/compiler-rt-3.8.1.src/lib/msan/msan.cc 2016-05-23 09:04:33.000000000 +0200
@@ -462,13 +462,8 @@
}
unsigned char *s = (unsigned char*)MEM_TO_SHADOW(x);
- for (uptr i = 0; i < size; i++) {
-#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
- Printf("%x%x ", s[i] & 0xf, s[i] >> 4);
-#else
+ for (uptr i = 0; i < size; i++)
Printf("%x%x ", s[i] >> 4, s[i] & 0xf);
-#endif
- }
Printf("\n");
}
@@ -580,13 +575,13 @@
}
u16 __sanitizer_unaligned_load16(const uu16 *p) {
- __msan_retval_tls[0] = *(uu16 *)MEM_TO_SHADOW((uptr)p);
+ *(uu16 *)&__msan_retval_tls[0] = *(uu16 *)MEM_TO_SHADOW((uptr)p);
if (__msan_get_track_origins())
__msan_retval_origin_tls = GetOriginIfPoisoned((uptr)p, sizeof(*p));
return *p;
}
u32 __sanitizer_unaligned_load32(const uu32 *p) {
- __msan_retval_tls[0] = *(uu32 *)MEM_TO_SHADOW((uptr)p);
+ *(uu32 *)&__msan_retval_tls[0] = *(uu32 *)MEM_TO_SHADOW((uptr)p);
if (__msan_get_track_origins())
__msan_retval_origin_tls = GetOriginIfPoisoned((uptr)p, sizeof(*p));
return *p;
@@ -598,7 +593,7 @@
return *p;
}
void __sanitizer_unaligned_store16(uu16 *p, u16 x) {
- u16 s = __msan_param_tls[1];
+ u16 s = *(uu16 *)&__msan_param_tls[1];
*(uu16 *)MEM_TO_SHADOW((uptr)p) = s;
if (s && __msan_get_track_origins())
if (uu32 o = __msan_param_origin_tls[2])
@@ -606,7 +601,7 @@
*p = x;
}
void __sanitizer_unaligned_store32(uu32 *p, u32 x) {
- u32 s = __msan_param_tls[1];
+ u32 s = *(uu32 *)&__msan_param_tls[1];
*(uu32 *)MEM_TO_SHADOW((uptr)p) = s;
if (s && __msan_get_track_origins())
if (uu32 o = __msan_param_origin_tls[2])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compiler-rt-3.8.0.src/lib/msan/msan_interceptors.cc new/compiler-rt-3.8.1.src/lib/msan/msan_interceptors.cc
--- old/compiler-rt-3.8.0.src/lib/msan/msan_interceptors.cc 2016-02-17 20:05:23.000000000 +0100
+++ new/compiler-rt-3.8.1.src/lib/msan/msan_interceptors.cc 2016-05-24 13:11:57.000000000 +0200
@@ -1628,7 +1628,11 @@
INTERCEPT_FUNCTION(getrusage);
INTERCEPT_FUNCTION(sigaction);
INTERCEPT_FUNCTION(signal);
+#if defined(__mips__)
+ INTERCEPT_FUNCTION_VER(pthread_create, "GLIBC_2.2");
+#else
INTERCEPT_FUNCTION(pthread_create);
+#endif
INTERCEPT_FUNCTION(pthread_key_create);
INTERCEPT_FUNCTION(pthread_join);
INTERCEPT_FUNCTION(tzset);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compiler-rt-3.8.0.src/lib/msan/msan_report.cc new/compiler-rt-3.8.1.src/lib/msan/msan_report.cc
--- old/compiler-rt-3.8.0.src/lib/msan/msan_report.cc 2015-03-31 20:16:42.000000000 +0200
+++ new/compiler-rt-3.8.1.src/lib/msan/msan_report.cc 2016-05-23 09:04:33.000000000 +0200
@@ -221,11 +221,7 @@
} else {
unsigned char v = *(unsigned char *)s;
if (v) last_quad_poisoned = true;
-#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
- Printf("%x%x", v & 0xf, v >> 4);
-#else
Printf("%x%x", v >> 4, v & 0xf);
-#endif
}
// Group end.
if (pos % 4 == 3 && with_origins) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compiler-rt-3.8.0.src/lib/msan/tests/msan_test.cc new/compiler-rt-3.8.1.src/lib/msan/tests/msan_test.cc
--- old/compiler-rt-3.8.0.src/lib/msan/tests/msan_test.cc 2015-11-24 21:28:48.000000000 +0100
+++ new/compiler-rt-3.8.1.src/lib/msan/tests/msan_test.cc 2016-05-23 09:03:45.000000000 +0200
@@ -1117,8 +1117,8 @@
struct hostent he;
struct hostent *result;
int err;
- int res = gethostbyname_r("localhost", &he, buf, sizeof(buf), &result, &err);
- ASSERT_EQ(ERANGE, res);
+ gethostbyname_r("localhost", &he, buf, sizeof(buf), &result, &err);
+ ASSERT_EQ(ERANGE, errno);
EXPECT_NOT_POISONED(err);
}
@@ -1214,17 +1214,21 @@
}
TEST(MemorySanitizer, shmat) {
- void *p = mmap(NULL, 4096, PROT_READ | PROT_WRITE,
- MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
- ASSERT_NE(MAP_FAILED, p);
+ const int kShmSize = 4096;
+ void *mapping_start = mmap(NULL, kShmSize + SHMLBA, PROT_READ | PROT_WRITE,
+ MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+ ASSERT_NE(MAP_FAILED, mapping_start);
+
+ void *p = (void *)(((unsigned long)mapping_start + SHMLBA - 1) / SHMLBA * SHMLBA);
+ // p is now SHMLBA-aligned;
((char *)p)[10] = *GetPoisoned<U1>();
- ((char *)p)[4095] = *GetPoisoned<U1>();
+ ((char *)p)[kShmSize - 1] = *GetPoisoned<U1>();
- int res = munmap(p, 4096);
+ int res = munmap(mapping_start, kShmSize + SHMLBA);
ASSERT_EQ(0, res);
- int id = shmget(IPC_PRIVATE, 4096, 0644 | IPC_CREAT);
+ int id = shmget(IPC_PRIVATE, kShmSize, 0644 | IPC_CREAT);
ASSERT_GT(id, -1);
void *q = shmat(id, p, 0);
@@ -1232,7 +1236,7 @@
EXPECT_NOT_POISONED(((char *)q)[0]);
EXPECT_NOT_POISONED(((char *)q)[10]);
- EXPECT_NOT_POISONED(((char *)q)[4095]);
+ EXPECT_NOT_POISONED(((char *)q)[kShmSize - 1]);
res = shmdt(q);
ASSERT_EQ(0, res);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compiler-rt-3.8.0.src/lib/sanitizer_common/sanitizer_linux.cc new/compiler-rt-3.8.1.src/lib/sanitizer_common/sanitizer_linux.cc
--- old/compiler-rt-3.8.0.src/lib/sanitizer_common/sanitizer_linux.cc 2015-12-15 01:33:45.000000000 +0100
+++ new/compiler-rt-3.8.1.src/lib/sanitizer_common/sanitizer_linux.cc 2016-06-01 10:17:03.000000000 +0200
@@ -241,7 +241,15 @@
return internal_syscall(SYSCALL(newfstatat), AT_FDCWD, (uptr)path,
(uptr)buf, AT_SYMLINK_NOFOLLOW);
#elif SANITIZER_LINUX_USES_64BIT_SYSCALLS
+# if SANITIZER_MIPS64
+ // For mips64, lstat syscall fills buffer in the format of kernel_stat
+ struct kernel_stat kbuf;
+ int res = internal_syscall(SYSCALL(lstat), path, &kbuf);
+ kernel_stat_to_stat(&kbuf, (struct stat *)buf);
+ return res;
+# else
return internal_syscall(SYSCALL(lstat), (uptr)path, (uptr)buf);
+# endif
#else
struct stat64 buf64;
int res = internal_syscall(SYSCALL(lstat64), path, &buf64);
@@ -252,7 +260,15 @@
uptr internal_fstat(fd_t fd, void *buf) {
#if SANITIZER_FREEBSD || SANITIZER_LINUX_USES_64BIT_SYSCALLS
+# if SANITIZER_MIPS64
+ // For mips64, fstat syscall fills buffer in the format of kernel_stat
+ struct kernel_stat kbuf;
+ int res = internal_syscall(SYSCALL(fstat), fd, &kbuf);
+ kernel_stat_to_stat(&kbuf, (struct stat *)buf);
+ return res;
+# else
return internal_syscall(SYSCALL(fstat), fd, (uptr)buf);
+# endif
#else
struct stat64 buf64;
int res = internal_syscall(SYSCALL(fstat64), fd, &buf64);
@@ -586,7 +602,9 @@
// rt_sigaction, so we need to do the same (we'll need to reimplement the
// restorers; for x86_64 the restorer address can be obtained from
// oldact->sa_restorer upon a call to sigaction(xxx, NULL, oldact).
+#if !SANITIZER_ANDROID || !SANITIZER_MIPS32
k_act.sa_restorer = u_act->sa_restorer;
+#endif
}
uptr result = internal_syscall(SYSCALL(rt_sigaction), (uptr)signum,
@@ -600,7 +618,9 @@
internal_memcpy(&u_oldact->sa_mask, &k_oldact.sa_mask,
sizeof(__sanitizer_kernel_sigset_t));
u_oldact->sa_flags = k_oldact.sa_flags;
+#if !SANITIZER_ANDROID || !SANITIZER_MIPS32
u_oldact->sa_restorer = k_oldact.sa_restorer;
+#endif
}
return result;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compiler-rt-3.8.0.src/lib/sanitizer_common/sanitizer_linux_libcdep.cc new/compiler-rt-3.8.1.src/lib/sanitizer_common/sanitizer_linux_libcdep.cc
--- old/compiler-rt-3.8.0.src/lib/sanitizer_common/sanitizer_linux_libcdep.cc 2016-02-18 20:23:11.000000000 +0100
+++ new/compiler-rt-3.8.1.src/lib/sanitizer_common/sanitizer_linux_libcdep.cc 2016-06-01 10:17:03.000000000 +0200
@@ -158,7 +158,6 @@
#if !SANITIZER_FREEBSD && !SANITIZER_ANDROID && !SANITIZER_GO
static uptr g_tls_size;
-#endif
#ifdef __i386__
# define DL_INTERNAL_FUNCTION __attribute__((regparm(3), stdcall))
@@ -166,26 +165,7 @@
# define DL_INTERNAL_FUNCTION
#endif
-#if defined(__mips__) || defined(__powerpc64__)
-// TlsPreTcbSize includes size of struct pthread_descr and size of tcb
-// head structure. It lies before the static tls blocks.
-static uptr TlsPreTcbSize() {
-# if defined(__mips__)
- const uptr kTcbHead = 16; // sizeof (tcbhead_t)
-# elif defined(__powerpc64__)
- const uptr kTcbHead = 88; // sizeof (tcbhead_t)
-# endif
- const uptr kTlsAlign = 16;
- const uptr kTlsPreTcbSize =
- (ThreadDescriptorSize() + kTcbHead + kTlsAlign - 1) & ~(kTlsAlign - 1);
- InitTlsSize();
- g_tls_size = (g_tls_size + kTlsPreTcbSize + kTlsAlign -1) & ~(kTlsAlign - 1);
- return kTlsPreTcbSize;
-}
-#endif
-
void InitTlsSize() {
-#if !SANITIZER_FREEBSD && !SANITIZER_ANDROID && !SANITIZER_GO
// all current supported platforms have 16 bytes stack alignment
const size_t kStackAlign = 16;
typedef void (*get_tls_func)(size_t*, size_t*) DL_INTERNAL_FUNCTION;
@@ -201,8 +181,10 @@
if (tls_align < kStackAlign)
tls_align = kStackAlign;
g_tls_size = RoundUpTo(tls_size, tls_align);
-#endif // !SANITIZER_FREEBSD && !SANITIZER_ANDROID && !SANITIZER_GO
}
+#else
+void InitTlsSize() { }
+#endif // !SANITIZER_FREEBSD && !SANITIZER_ANDROID && !SANITIZER_GO
#if (defined(__x86_64__) || defined(__i386__) || defined(__mips__) \
|| defined(__aarch64__) || defined(__powerpc64__)) \
@@ -278,6 +260,24 @@
return kThreadSelfOffset;
}
+#if defined(__mips__) || defined(__powerpc64__)
+// TlsPreTcbSize includes size of struct pthread_descr and size of tcb
+// head structure. It lies before the static tls blocks.
+static uptr TlsPreTcbSize() {
+# if defined(__mips__)
+ const uptr kTcbHead = 16; // sizeof (tcbhead_t)
+# elif defined(__powerpc64__)
+ const uptr kTcbHead = 88; // sizeof (tcbhead_t)
+# endif
+ const uptr kTlsAlign = 16;
+ const uptr kTlsPreTcbSize =
+ (ThreadDescriptorSize() + kTcbHead + kTlsAlign - 1) & ~(kTlsAlign - 1);
+ InitTlsSize();
+ g_tls_size = (g_tls_size + kTlsPreTcbSize + kTlsAlign -1) & ~(kTlsAlign - 1);
+ return kTlsPreTcbSize;
+}
+#endif
+
uptr ThreadSelf() {
uptr descr_addr;
# if defined(__i386__)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compiler-rt-3.8.0.src/lib/sanitizer_common/sanitizer_platform.h new/compiler-rt-3.8.1.src/lib/sanitizer_common/sanitizer_platform.h
--- old/compiler-rt-3.8.0.src/lib/sanitizer_common/sanitizer_platform.h 2015-11-30 20:43:03.000000000 +0100
+++ new/compiler-rt-3.8.1.src/lib/sanitizer_common/sanitizer_platform.h 2016-05-22 16:17:10.000000000 +0200
@@ -81,6 +81,21 @@
# define SANITIZER_X32 0
#endif
+#if defined(__mips__)
+# define SANITIZER_MIPS 1
+# if defined(__mips64)
+# define SANITIZER_MIPS32 0
+# define SANITIZER_MIPS64 1
+# else
+# define SANITIZER_MIPS32 1
+# define SANITIZER_MIPS64 0
+# endif
+#else
+# define SANITIZER_MIPS 0
+# define SANITIZER_MIPS32 0
+# define SANITIZER_MIPS64 0
+#endif
+
// By default we allow to use SizeClassAllocator64 on 64-bit platform.
// But in some cases (e.g. AArch64's 39-bit address space) SizeClassAllocator64
// does not work well and we need to fallback to SizeClassAllocator32.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compiler-rt-3.8.0.src/lib/sanitizer_common/sanitizer_platform_limits_posix.cc new/compiler-rt-3.8.1.src/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
--- old/compiler-rt-3.8.0.src/lib/sanitizer_common/sanitizer_platform_limits_posix.cc 2015-11-30 10:19:22.000000000 +0100
+++ new/compiler-rt-3.8.1.src/lib/sanitizer_common/sanitizer_platform_limits_posix.cc 2016-06-01 10:17:03.000000000 +0200
@@ -1056,7 +1056,7 @@
// preprocessor macros.
CHECK_STRUCT_SIZE_AND_OFFSET(sigaction, sa_mask);
CHECK_STRUCT_SIZE_AND_OFFSET(sigaction, sa_flags);
-#if SANITIZER_LINUX
+#if SANITIZER_LINUX && (!SANITIZER_ANDROID || !SANITIZER_MIPS32)
CHECK_STRUCT_SIZE_AND_OFFSET(sigaction, sa_restorer);
#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compiler-rt-3.8.0.src/lib/sanitizer_common/sanitizer_platform_limits_posix.h new/compiler-rt-3.8.1.src/lib/sanitizer_common/sanitizer_platform_limits_posix.h
--- old/compiler-rt-3.8.0.src/lib/sanitizer_common/sanitizer_platform_limits_posix.h 2015-10-26 19:15:14.000000000 +0100
+++ new/compiler-rt-3.8.1.src/lib/sanitizer_common/sanitizer_platform_limits_posix.h 2016-06-01 10:17:03.000000000 +0200
@@ -77,11 +77,9 @@
const unsigned struct_kernel_stat_sz = 144;
const unsigned struct_kernel_stat64_sz = 104;
#elif defined(__mips__)
- #if SANITIZER_WORDSIZE == 64
- const unsigned struct_kernel_stat_sz = 216;
- #else
- const unsigned struct_kernel_stat_sz = 144;
- #endif
+ const unsigned struct_kernel_stat_sz =
+ SANITIZER_ANDROID ? FIRST_32_SECOND_64(104, 128) :
+ FIRST_32_SECOND_64(144, 216);
const unsigned struct_kernel_stat64_sz = 104;
#endif
struct __sanitizer_perf_event_attr {
@@ -516,7 +514,11 @@
};
#if SANITIZER_ANDROID
+# if SANITIZER_MIPS
+ typedef unsigned long __sanitizer_sigset_t[16/sizeof(unsigned long)];
+# else
typedef unsigned long __sanitizer_sigset_t;
+# endif
#elif SANITIZER_MAC
typedef unsigned __sanitizer_sigset_t;
#elif SANITIZER_LINUX
@@ -542,6 +544,15 @@
__sanitizer_sigset_t sa_mask;
void (*sa_restorer)();
};
+#elif SANITIZER_ANDROID && SANITIZER_MIPS32 // check this before WORDSIZE == 32
+ struct __sanitizer_sigaction {
+ unsigned sa_flags;
+ union {
+ void (*sigaction)(int sig, void *siginfo, void *uctx);
+ void (*handler)(int sig);
+ };
+ __sanitizer_sigset_t sa_mask;
+ };
#elif SANITIZER_ANDROID && (SANITIZER_WORDSIZE == 32)
struct __sanitizer_sigaction {
union {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compiler-rt-3.8.0.src/lib/sanitizer_common/sanitizer_stacktrace.cc new/compiler-rt-3.8.1.src/lib/sanitizer_common/sanitizer_stacktrace.cc
--- old/compiler-rt-3.8.0.src/lib/sanitizer_common/sanitizer_stacktrace.cc 2015-12-01 21:58:44.000000000 +0100
+++ new/compiler-rt-3.8.1.src/lib/sanitizer_common/sanitizer_stacktrace.cc 2016-05-25 07:57:29.000000000 +0200
@@ -40,11 +40,6 @@
top_frame_bp = 0;
}
-// Check if given pointer points into allocated stack area.
-static inline bool IsValidFrame(uptr frame, uptr stack_top, uptr stack_bottom) {
- return frame > stack_bottom && frame < stack_top - 2 * sizeof (uhwptr);
-}
-
// In GCC on ARM bp points to saved lr, not fp, so we should check the next
// cell in stack to be a saved frame pointer. GetCanonicFrame returns the
// pointer to saved frame pointer in any case.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compiler-rt-3.8.0.src/lib/sanitizer_common/sanitizer_stacktrace.h new/compiler-rt-3.8.1.src/lib/sanitizer_common/sanitizer_stacktrace.h
--- old/compiler-rt-3.8.0.src/lib/sanitizer_common/sanitizer_stacktrace.h 2015-12-04 18:50:03.000000000 +0100
+++ new/compiler-rt-3.8.1.src/lib/sanitizer_common/sanitizer_stacktrace.h 2016-05-25 07:57:29.000000000 +0200
@@ -110,6 +110,11 @@
void operator=(const BufferedStackTrace &);
};
+// Check if given pointer points into allocated stack area.
+static inline bool IsValidFrame(uptr frame, uptr stack_top, uptr stack_bottom) {
+ return frame > stack_bottom && frame < stack_top - 2 * sizeof (uhwptr);
+}
+
} // namespace __sanitizer
// Use this macro if you want to print stack trace with the caller
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compiler-rt-3.8.0.src/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc new/compiler-rt-3.8.1.src/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
--- old/compiler-rt-3.8.0.src/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc 2015-12-08 22:54:39.000000000 +0100
+++ new/compiler-rt-3.8.1.src/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc 2016-06-01 10:17:03.000000000 +0200
@@ -38,6 +38,9 @@
# include
participants (1)
-
root@hilbert.suse.de