diff --git a/boost-1.77-build-drop-rpath.patch b/boost-1.77-build-drop-rpath.patch deleted file mode 100644 index 9c465aac5a639fd934f3212e91ee8db7f17134a6..0000000000000000000000000000000000000000 --- a/boost-1.77-build-drop-rpath.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 8f85a56a883d3712d4d0cb23dc22ccdfb8201f12 Mon Sep 17 00:00:00 2001 -From: sdlzx -Date: Wed, 15 Sep 2021 23:41:16 +0800 -Subject: [PATCH] Drop rpath - -Originally-by: Yaakov Selkowitz ---- - tools/build/src/tools/gcc.jam | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/tools/build/src/tools/gcc.jam b/tools/build/src/tools/gcc.jam -index f48a00dc9..5c4e3e3ed 100644 ---- a/tools/build/src/tools/gcc.jam -+++ b/tools/build/src/tools/gcc.jam -@@ -1034,17 +1034,17 @@ actions link.mingw bind LIBRARIES - - actions link.dll.mingw bind LIBRARIES - { -- "$(CONFIG_COMMAND)" -L"$(LINKPATH)" "$(.IMPLIB-COMMAND)$(<[1])" -o "$(<[-1])" -shared @"@($(<[-1]:T).rsp:E=$(START-GROUP) "$(>:T)" "$(LIBRARIES:T)" $(FINDLIBS-ST-PFX:T) -l$(FINDLIBS-ST:T) $(FINDLIBS-SA-PFX:T) -l$(FINDLIBS-SA:T) $(END-GROUP))" $(OPTIONS) $(USER_OPTIONS) -+ "$(CONFIG_COMMAND)" -L"$(LINKPATH)" "$(.IMPLIB-COMMAND)$(<[0])" -o "$(<[-1])" -shared @"@($(<[-1]:T).rsp:E=$(START-GROUP) "$(>:T)" "$(LIBRARIES:T)" $(FINDLIBS-ST-PFX:T) -l$(FINDLIBS-ST:T) $(FINDLIBS-SA-PFX:T) -l$(FINDLIBS-SA:T) $(END-GROUP))" $(OPTIONS) $(USER_OPTIONS) - } - - actions link bind LIBRARIES - { -- "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -Wl,$(RPATH_OPTION:E=-R)$(SPACE)-Wl,$(RPATH) -Wl,-rpath-link$(SPACE)-Wl,"$(RPATH_LINK)" -o "$(<)" $(START-GROUP) "$(>)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) $(USER_OPTIONS) -+ "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -o "$(<)" $(START-GROUP) "$(>)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) $(USER_OPTIONS) - } - - actions link.dll bind LIBRARIES - { -- "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -Wl,$(RPATH_OPTION:E=-R)$(SPACE)-Wl,$(RPATH) "$(.IMPLIB-COMMAND)$(<[1])" -o "$(<[-1])" $(HAVE_SONAME)-Wl,$(SONAME_OPTION)$(SPACE)-Wl,$(<[-1]:D=) -shared $(START-GROUP) "$(>)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) $(USER_OPTIONS) -+ "$(CONFIG_COMMAND)" -L"$(LINKPATH)" "$(.IMPLIB-COMMAND)$(<[1])" -o "$(<[-1])" $(HAVE_SONAME)-Wl,$(SONAME_OPTION)$(SPACE)-Wl,$(<[-1]:D=) -shared $(START-GROUP) "$(>)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) $(USER_OPTIONS) - } - - ### --- -2.31.1 - diff --git a/boost-1.73-locale-empty-vector.patch b/boost-1.78-locale-Fix-access-to-first-element-of-empty-vector.patch similarity index 54% rename from boost-1.73-locale-empty-vector.patch rename to boost-1.78-locale-Fix-access-to-first-element-of-empty-vector.patch index fe063c78f1df7b535417112c5cbf379c96be82ef..50e08a471154ca22c986c951997690e01e117e7b 100644 --- a/boost-1.73-locale-empty-vector.patch +++ b/boost-1.78-locale-Fix-access-to-first-element-of-empty-vector.patch @@ -1,36 +1,33 @@ -From daf4ef50c88c2b9a6bf2c40b537eebc202caad6e Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?S=C3=A9bastien=20Gonzalve?= - -Date: Sat, 14 Nov 2020 10:39:47 +0100 -Subject: [PATCH] Do not try to access element when vector is empty - +From 1ff0ead837b32b9415dc840dfef6549e8754b98d Mon Sep 17 00:00:00 2001 +From: Alexander Grund +Date: Fri, 10 Dec 2021 17:53:01 +0100 +Subject: [PATCH] Fix access to first element of empty vector + Trying to access tmp[0] causes a crash on Fedora when assertion on STL are enabled. - + /usr/include/c++/10/bits/stl_vector.h:1045: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) [with _Tp = unsigned char; _Alloc = std::allocator; std::vector<_Tp, _Alloc>::reference = unsigned char&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]: Assertion '__builtin_expect(__n < this->size(), true)' failed. - -This patch just passes nullptr as pointer to getSortKey() when tmp size -is 0, preventing dereferencing elements in empty vector. - -I guess that &tmp[0] should be optimized as 'no real access' when -disabling assertion, but actually leads to crash when assert are -enabled. + +Fix is to never have an empty vector as ICU sort keys include the NULL +terminator, hence we need at least `length + 1` bytes which means the +vector has at least 1 element: The NULL terminator --- - src/icu/collator.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - + src/icu/collator.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + diff --git a/libs/locale/src/icu/collator.cpp b/libs/locale/src/icu/collator.cpp -index 7f1ea6a..dc59e8c 100644 +index 7f1ea6ae..79668aa6 100644 --- a/libs/locale/src/icu/collator.cpp +++ b/libs/locale/src/icu/collator.cpp -@@ -93,7 +93,7 @@ namespace boost { +@@ -91,9 +91,9 @@ namespace boost { + { + icu::UnicodeString str=cvt_.icu(b,e); std::vector tmp; - tmp.resize(str.length()); +- tmp.resize(str.length()); ++ tmp.resize(str.length() + 1u); icu::Collator *collate = get_collator(level); - int len = collate->getSortKey(str,&tmp[0],tmp.size()); -+ int len = collate->getSortKey(str,tmp.empty()?nullptr:&tmp[0],tmp.size()); ++ const int len = collate->getSortKey(str,&tmp[0],tmp.size()); if(len > int(tmp.size())) { tmp.resize(len); collate->getSortKey(str,&tmp[0],tmp.size()); --- -2.26.2 diff --git a/boost-1.77-pool-fix-interger-overflows-in-pool-ordered_malloc.patch b/boost-1.78-pool-fix-integer-overflows-in-pool-ordered_malloc.patch similarity index 74% rename from boost-1.77-pool-fix-interger-overflows-in-pool-ordered_malloc.patch rename to boost-1.78-pool-fix-integer-overflows-in-pool-ordered_malloc.patch index 8f9c3373df2c43280e1f263d5a592637c62fa860..191fa0dbc39d7d5e36b2337bc144774936bd1ba9 100644 --- a/boost-1.77-pool-fix-interger-overflows-in-pool-ordered_malloc.patch +++ b/boost-1.78-pool-fix-integer-overflows-in-pool-ordered_malloc.patch @@ -1,19 +1,22 @@ -From b59c1be697a001a71f6b92660e41d8915eea941d Mon Sep 17 00:00:00 2001 +From acb849a8a16499907c554a3c00da201486388459 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh -Date: Thu, 9 Sep 2021 10:28:13 +0300 -Subject: [PATCH] fix integer overflows in pool::ordered_malloc +Date: Thu, 4 Nov 2021 03:39:23 +0200 +Subject: [PATCH] fix integer overflows in pool::ordered_malloc (#42) Fixes trac #6701 (https://svn.boost.org/trac10/ticket/6701). Originally-by: Jonathan Wakely --- - boost/pool/pool.hpp | 32 +++++++++++++++++++++++--------- + boost/pool/pool.hpp | 31 ++++++++++++++++++++++--------- + libs/pool/test/Jamfile.v2 | 1 + + libs/pool/test/suppressions.txt | 7 +++++++ libs/pool/test/test_bug_6701.cpp | 27 +++++++++++++++++++++++++++ - 2 files changed, 50 insertions(+), 9 deletions(-) + 4 files changed, 57 insertions(+), 9 deletions(-) + create mode 100644 libs/pool/test/suppressions.txt create mode 100644 libs/pool/test/test_bug_6701.cpp diff --git a/boost/pool/pool.hpp b/boost/pool/pool.hpp -index c47b11faf..a899ca0a2 100644 +index c47b11faf..12728a7ae 100644 --- a/boost/pool/pool.hpp +++ b/boost/pool/pool.hpp @@ -26,6 +26,8 @@ @@ -25,13 +28,12 @@ index c47b11faf..a899ca0a2 100644 // boost::integer::static_lcm #include // boost::simple_segregated_storage -@@ -355,6 +357,13 @@ class pool: protected simple_segregated_storage < typename UserAllocator::size_t +@@ -355,6 +357,12 @@ class pool: protected simple_segregated_storage < typename UserAllocator::size_t return s; } + size_type max_chunks() const + { //! Calculated maximum number of memory chunks that can be allocated in a single call by this Pool. -+ size_type partition_size = alloc_size(); + size_type POD_size = integer::static_lcm::value + sizeof(size_type); + return (std::numeric_limits::max() - POD_size) / alloc_size(); + } @@ -39,7 +41,7 @@ index c47b11faf..a899ca0a2 100644 static void * & nextof(void * const ptr) { //! \returns Pointer dereferenced. //! (Provided and used for the sake of code readability :) -@@ -375,6 +384,8 @@ class pool: protected simple_segregated_storage < typename UserAllocator::size_t +@@ -375,6 +383,8 @@ class pool: protected simple_segregated_storage < typename UserAllocator::size_t //! the first time that object needs to allocate system memory. //! The default is 32. This parameter may not be 0. //! \param nmax_size is the maximum number of chunks to allocate in one block. @@ -48,7 +50,7 @@ index c47b11faf..a899ca0a2 100644 } ~pool() -@@ -398,8 +409,8 @@ class pool: protected simple_segregated_storage < typename UserAllocator::size_t +@@ -398,8 +408,8 @@ class pool: protected simple_segregated_storage < typename UserAllocator::size_t } void set_next_size(const size_type nnext_size) { //! Set number of chunks to request from the system the next time that object needs to allocate system memory. This value should never be set to 0. @@ -59,7 +61,7 @@ index c47b11faf..a899ca0a2 100644 } size_type get_max_size() const { //! \returns max_size. -@@ -407,7 +418,8 @@ class pool: protected simple_segregated_storage < typename UserAllocator::size_t +@@ -407,7 +417,8 @@ class pool: protected simple_segregated_storage < typename UserAllocator::size_t } void set_max_size(const size_type nmax_size) { //! Set max_size. @@ -69,7 +71,7 @@ index c47b11faf..a899ca0a2 100644 } size_type get_requested_size() const { //! \returns the requested size passed into the constructor. -@@ -708,9 +720,9 @@ void * pool::malloc_need_resize() +@@ -708,9 +719,9 @@ void * pool::malloc_need_resize() BOOST_USING_STD_MIN(); if(!max_size) @@ -81,7 +83,7 @@ index c47b11faf..a899ca0a2 100644 // initialize it, store().add_block(node.begin(), node.element_size(), partition_size); -@@ -748,9 +760,9 @@ void * pool::ordered_malloc_need_resize() +@@ -748,9 +759,9 @@ void * pool::ordered_malloc_need_resize() BOOST_USING_STD_MIN(); if(!max_size) @@ -93,7 +95,7 @@ index c47b11faf..a899ca0a2 100644 // initialize it, // (we can use "add_block" here because we know that -@@ -792,6 +804,8 @@ void * pool::ordered_malloc(const size_type n) +@@ -792,6 +803,8 @@ void * pool::ordered_malloc(const size_type n) { //! Gets address of a chunk n, allocating new memory if not already available. //! \returns Address of chunk n if allocated ok. //! \returns 0 if not enough memory for n chunks. @@ -102,7 +104,7 @@ index c47b11faf..a899ca0a2 100644 const size_type partition_size = alloc_size(); const size_type total_req_size = n * requested_size; -@@ -840,9 +854,9 @@ void * pool::ordered_malloc(const size_type n) +@@ -840,9 +853,9 @@ void * pool::ordered_malloc(const size_type n) BOOST_USING_STD_MIN(); if(!max_size) @@ -114,6 +116,31 @@ index c47b11faf..a899ca0a2 100644 // insert it into the list, // handle border case. +diff --git a/libs/pool/test/Jamfile.v2 b/libs/pool/test/Jamfile.v2 +index 9e96abcbd..133879a93 100644 +--- a/libs/pool/test/Jamfile.v2 ++++ b/libs/pool/test/Jamfile.v2 +@@ -34,6 +34,7 @@ test-suite pool : + pathscale:-Wno-long-long ] + [ run test_bug_2696.cpp ] + [ run test_bug_5526.cpp ] ++ [ run test_bug_6701.cpp ] + [ run test_threading.cpp : : : multi /boost/thread//boost_thread ] + [ compile test_poisoned_macros.cpp ] + ; +diff --git a/libs/pool/test/suppressions.txt b/libs/pool/test/suppressions.txt +new file mode 100644 +index 000000000..e30fb813c +--- /dev/null ++++ b/libs/pool/test/suppressions.txt +@@ -0,0 +1,7 @@ ++{ ++ no_fishy_value ++ Memcheck:FishyValue ++ __builtin_vec_new(size) ++ fun:_ZnamRKSt9nothrow_t ++ ... ++} diff --git a/libs/pool/test/test_bug_6701.cpp b/libs/pool/test/test_bug_6701.cpp new file mode 100644 index 000000000..e484d3c7e @@ -148,5 +175,5 @@ index 000000000..e484d3c7e + return 0; +} -- -2.31.1 +2.33.1 diff --git a/boost.spec b/boost.spec index e761791a44f12841c7508008bab9190a649a088c..1eab5b96e95169d2a70be4c811c6c1ad68f89c2f 100644 --- a/boost.spec +++ b/boost.spec @@ -1,6 +1,6 @@ %global boost_docdir __tmp_docdir %global boost_examplesdir __tmp_examplesdir -%global version_enc 1_77_0 +%global version_enc 1_78_0 %bcond_with mpich %bcond_with openmpi @@ -17,32 +17,24 @@ %bcond_with docs_generated Name: boost -Version: 1.77.0 -Release: 4 +Version: 1.78.0 +Release: 1 Summary: The free peer-reviewed portable C++ source libraries License: Boost Software License 1.0 URL: http://www.boost.org -Source0: https://boostorg.jfrog.io/ui/native/main/release/1.77.0/source/%{name}_%{version_enc}.tar.gz +Source0: https://boostorg.jfrog.io/ui/native/main/release/%{version}/source/%{name}_%{version_enc}.tar.gz Source1: bjam -# https://bugzilla.redhat.com/show_bug.cgi?id=828856 -# https://bugzilla.redhat.com/show_bug.cgi?id=828857 -# https://svn.boost.org/trac/boost/ticket/6701 +# All of the following patches have been merged into boost develop branch +# Remove them at the next release # https://github.com/boostorg/pool/pull/42 -Patch1: boost-1.77-pool-fix-interger-overflows-in-pool-ordered_malloc.patch - -# https://bugzilla.redhat.com/show_bug.cgi?id=1318383 -Patch2: boost-1.77-build-drop-rpath.patch - -# https://bugzilla.redhat.com/show_bug.cgi?id=1899888 -# https://github.com/boostorg/locale/issues/52 -Patch3: boost-1.73-locale-empty-vector.patch - +Patch0: boost-1.78-pool-fix-interger-overflows-in-pool-ordered_malloc.patch +# https://github.com/boostorg/locale/pull/72 +Patch1: boost-1.78-locale-Fix-access-to-first-element-of-empty-vector.patch # https://github.com/boostorg/locale/pull/38 -Patch4: boost-1.77-locale-remove-linking-with-boost-system.patch - +Patch2: boost-1.77-locale-remove-linking-with-boost-system.patch # https://github.com/boostorg/type_erasure/pull/19 -Patch5: boost-1.77-type_erasure-remove-boost-system-linkage.patch +Patch3: boost-1.77-type_erasure-remove-boost-system-linkage.patch Requires: %{name}-atomic%{?_isa} = %{version}-%{release} Requires: %{name}-chrono%{?_isa} = %{version}-%{release} @@ -50,7 +42,6 @@ Requires: %{name}-container%{?_isa} = %{version}-%{release} Requires: %{name}-context%{?_isa} = %{version}-%{release} Requires: %{name}-coroutine%{?_isa} = %{version}-%{release} Requires: %{name}-date-time%{?_isa} = %{version}-%{release} -Requires: %{name}-fiber%{?_isa} = %{version}-%{release} Requires: %{name}-filesystem%{?_isa} = %{version}-%{release} Requires: %{name}-graph%{?_isa} = %{version}-%{release} Requires: %{name}-iostreams%{?_isa} = %{version}-%{release} @@ -62,7 +53,6 @@ Requires: %{name}-program-options%{?_isa} = %{version}-%{release} Requires: %{name}-random%{?_isa} = %{version}-%{release} Requires: %{name}-regex%{?_isa} = %{version}-%{release} Requires: %{name}-serialization%{?_isa} = %{version}-%{release} -Requires: %{name}-stacktrace%{?_isa} = %{version}-%{release} Requires: %{name}-system%{?_isa} = %{version}-%{release} Requires: %{name}-test%{?_isa} = %{version}-%{release} Requires: %{name}-thread%{?_isa} = %{version}-%{release} @@ -168,15 +158,6 @@ Summary: A set of date-time libraries based on generic programming concepts Boost Date Time is a set of date-time libraries based on generic programming concepts. -%package fiber -Summary: (C++11) Userland threads library - -%description fiber - -Boost.Fiber provides a framework for micro-/userland-threads (fibers) -scheduled cooperatively. The API contains classes and functions to manage -and synchronize fibers similiarly to standard thread support library. - %package filesystem Summary: Run-time component of boost filesystem library @@ -322,13 +303,6 @@ Summary: Run-time component of boost serialization library Run-time support for serialization for persistence and marshaling. -%package stacktrace -Summary: Run-time component of boost stacktrace library - -%description stacktrace - -Gather, store, copy and print backtraces. - %package system Summary: Run-time component of boost system support library @@ -873,10 +847,6 @@ fi %license LICENSE_1_0.txt %{_libdir}/libboost_date_time.so.%{version} -%files fiber -%license LICENSE_1_0.txt -%{_libdir}/libboost_fiber.so.%{version} - %files filesystem %license LICENSE_1_0.txt %{_libdir}/libboost_filesystem.so.%{version} @@ -954,12 +924,6 @@ fi %{_libdir}/libboost_serialization.so.%{version} %{_libdir}/libboost_wserialization.so.%{version} -%files stacktrace -%license LICENSE_1_0.txt -%{_libdir}/libboost_stacktrace_addr2line.so.%{version} -%{_libdir}/libboost_stacktrace_basic.so.%{version} -%{_libdir}/libboost_stacktrace_noop.so.%{version} - %files system %license LICENSE_1_0.txt %{_libdir}/libboost_system.so.%{version} @@ -1073,6 +1037,9 @@ fi %{_mandir}/man1/bjam.1* %changelog +* Fri Dec 10 2021 sdlzx - 1.78.0-1 +- update to 1.78.0 + * Wed Oct 06 2021 Liu Zixian - 1.77.0-4 - Remove dependencies on header-only libraries diff --git a/boost_1_77_0.tar.gz b/boost_1_78_0.tar.gz similarity index 87% rename from boost_1_77_0.tar.gz rename to boost_1_78_0.tar.gz index a5a11111d9f1fe130df43652f97cd4003e5caaf9..190dc53c072f2cac18dee9d1fc1c171a7582668e 100644 Binary files a/boost_1_77_0.tar.gz and b/boost_1_78_0.tar.gz differ