summaryrefslogtreecommitdiff
path: root/dev-libs/boost/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-12-25 23:06:25 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-12-25 23:06:25 +0000
commit441d1370330332b7d78f238d2f5e13f7aed5e4e0 (patch)
tree6a5171dd615dfeee62a45044144c66e864738fb0 /dev-libs/boost/files
parentab3da91fb6c91a9df52fff8f991570f456fd3c7a (diff)
gentoo christmass resync : 25.12.2020
Diffstat (limited to 'dev-libs/boost/files')
-rw-r--r--dev-libs/boost/files/boost-1.72.0-boost-mpi-python.patch50
-rw-r--r--dev-libs/boost/files/boost-1.72.0-missing-serialization-split_member-include.patch29
-rw-r--r--dev-libs/boost/files/boost-1.72.0-revert-cease-dependence-on-range.patch49
-rw-r--r--dev-libs/boost/files/boost-1.74-CVE-2012-2677.patch125
4 files changed, 125 insertions, 128 deletions
diff --git a/dev-libs/boost/files/boost-1.72.0-boost-mpi-python.patch b/dev-libs/boost/files/boost-1.72.0-boost-mpi-python.patch
deleted file mode 100644
index 8fb164a6278b..000000000000
--- a/dev-libs/boost/files/boost-1.72.0-boost-mpi-python.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-Tag Boost.MPI python impls properly to avoid name clash
-https://github.com/boostorg/mpi/issues/112
-
---- a/boostcpp.jam
-+++ b/boostcpp.jam
-@@ -185,7 +185,7 @@
-
- rule tag ( name : type ? : property-set )
- {
-- if $(type) in STATIC_LIB SHARED_LIB IMPORT_LIB
-+ if $(type) in STATIC_LIB SHARED_LIB IMPORT_LIB PYTHON_EXTENSION
- {
- local args = $(.format-name-args) ;
- if $(layout) = versioned
-@@ -223,7 +223,7 @@
- {
- local result = $(name) ;
-
-- if $(type) in STATIC_LIB SHARED_LIB IMPORT_LIB
-+ if $(type) in STATIC_LIB SHARED_LIB IMPORT_LIB PYTHON_EXTENSION
- {
- # Add Python version suffix
-
---- a/libs/mpi/build/Jamfile.v2
-+++ b/libs/mpi/build/Jamfile.v2
-@@ -58,13 +58,13 @@
- rule python-tag ( name : type ? : property-set )
- {
- local result = $(name) ;
-- if $(type) in STATIC_LIB SHARED_LIB IMPORT_LIB
-+ if $(type) in STATIC_LIB SHARED_LIB IMPORT_LIB PYTHON_EXTENSION
- {
- local version = [ $(property-set).get <python> ] ;
- local lib-suffix = [ version-suffix $(version) ] ;
- result = $(result)$(lib-suffix) ;
- }
-- if $(type) in STATIC_LIB SHARED_LIB IMPORT_LIB && $(PYTHON_ID)
-+ if $(type) in STATIC_LIB SHARED_LIB IMPORT_LIB PYTHON_EXTENSION && $(PYTHON_ID)
- {
- result = $(result)-$(PYTHON_ID) ;
- }
-@@ -168,6 +168,8 @@
- <link>shared:<define>BOOST_PYTHON_DYN_LINK=1
- <link>shared <runtime-link>shared
- <python-debugging>on:<define>BOOST_DEBUG_PYTHON
-+ -<tag>@$(BOOST_JAMROOT_MODULE)%$(BOOST_JAMROOT_MODULE).tag
-+ <tag>@$(__name__).python-tag
- ;
-
- mpi_python_libs = boost_mpi_python mpi ;
diff --git a/dev-libs/boost/files/boost-1.72.0-missing-serialization-split_member-include.patch b/dev-libs/boost/files/boost-1.72.0-missing-serialization-split_member-include.patch
deleted file mode 100644
index 0c9f72583efd..000000000000
--- a/dev-libs/boost/files/boost-1.72.0-missing-serialization-split_member-include.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-Missing #include, as the split_member.hpp include is not
-part of the nvp.hpp interface, and hence cannot be relied
-upon to be included transitively.
-
-Confirmed on
-https://github.com/boostorg/serialization/commit/c32a663c9963385430abc563f9c85f94d8da43a9#r36528430
-
-Bug: https://bugs.gentoo.org/703294
-
---- a/boost/bimap/detail/map_view_iterator.hpp
-+++ b/boost/bimap/detail/map_view_iterator.hpp
-@@ -22,6 +22,7 @@
-
- #ifndef BOOST_BIMAP_DISABLE_SERIALIZATION
- #include <boost/serialization/nvp.hpp>
-+ #include <boost/serialization/split_member.hpp>
- #endif // BOOST_BIMAP_DISABLE_SERIALIZATION
-
- #include <boost/iterator/detail/enable_if.hpp>
---- a/boost/bimap/detail/set_view_iterator.hpp
-+++ b/boost/bimap/detail/set_view_iterator.hpp
-@@ -22,6 +22,7 @@
-
- #ifndef BOOST_BIMAP_DISABLE_SERIALIZATION
- #include <boost/serialization/nvp.hpp>
-+ #include <boost/serialization/split_member.hpp>
- #endif // BOOST_BIMAP_DISABLE_SERIALIZATION
-
- #include <boost/iterator/detail/enable_if.hpp>
diff --git a/dev-libs/boost/files/boost-1.72.0-revert-cease-dependence-on-range.patch b/dev-libs/boost/files/boost-1.72.0-revert-cease-dependence-on-range.patch
deleted file mode 100644
index a6002074ab93..000000000000
--- a/dev-libs/boost/files/boost-1.72.0-revert-cease-dependence-on-range.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 436e1dbe6fcd31523d261d18ad011392f1d6fbbc Mon Sep 17 00:00:00 2001
-From: Oliver Kowalke <oliver.kowalke@gmail.com>
-Date: Sun, 1 Dec 2019 20:40:28 +0100
-Subject: [PATCH] Revert "Cease dependence on Range"
-
-This reverts commit 0c556bb59241e682bbcd3f572815149c5a9b17db.
-
-see #44 (One test fails to compile after boostorg/coroutine submodule updated)
----
- boost/coroutine/asymmetric_coroutine.hpp | 12 +++---------
- 1 file changed, 3 insertions(+), 9 deletions(-)
-
-diff --git a/boost/coroutine/asymmetric_coroutine.hpp b/boost/coroutine/asymmetric_coroutine.hpp
-index ea96981..640896f 100644
---- a/boost/coroutine/asymmetric_coroutine.hpp
-+++ b/boost/coroutine/asymmetric_coroutine.hpp
-@@ -14,6 +14,7 @@
- #include <boost/assert.hpp>
- #include <boost/config.hpp>
- #include <boost/move/move.hpp>
-+#include <boost/range.hpp>
- #include <boost/throw_exception.hpp>
- #include <boost/utility/explicit_operator_bool.hpp>
-
-@@ -2354,19 +2355,12 @@ end( push_coroutine< R > & c)
-
- }
-
--// forward declaration of Boost.Range traits to break dependency on it
--template<typename C, typename Enabler>
--struct range_mutable_iterator;
--
--template<typename C, typename Enabler>
--struct range_const_iterator;
--
- template< typename Arg >
--struct range_mutable_iterator< coroutines::push_coroutine< Arg >, void >
-+struct range_mutable_iterator< coroutines::push_coroutine< Arg > >
- { typedef typename coroutines::push_coroutine< Arg >::iterator type; };
-
- template< typename R >
--struct range_mutable_iterator< coroutines::pull_coroutine< R >, void >
-+struct range_mutable_iterator< coroutines::pull_coroutine< R > >
- { typedef typename coroutines::pull_coroutine< R >::iterator type; };
-
- }
---
-2.24.1
-
diff --git a/dev-libs/boost/files/boost-1.74-CVE-2012-2677.patch b/dev-libs/boost/files/boost-1.74-CVE-2012-2677.patch
new file mode 100644
index 000000000000..ff947f74f1c4
--- /dev/null
+++ b/dev-libs/boost/files/boost-1.74-CVE-2012-2677.patch
@@ -0,0 +1,125 @@
+https://src.fedoraproject.org/rpms/boost/raw/master/f/boost-1.58.0-pool.patch
+https://bugzilla.redhat.com/show_bug.cgi?id=828856
+https://bugs.gentoo.org/620468
+https://svn.boost.org/trac10/ticket/6701
+
+Index: boost/pool/pool.hpp
+===================================================================
+--- a/boost/pool/pool.hpp (revision 78317)
++++ b/boost/pool/pool.hpp (revision 78326)
+@@ -27,4 +27,6 @@
+ #include <boost/pool/poolfwd.hpp>
+
++// std::numeric_limits
++#include <boost/limits.hpp>
+ // boost::integer::static_lcm
+ #include <boost/integer/common_factor_ct.hpp>
+@@ -358,4 +360,11 @@
+ }
+
++ 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<sizeof(size_type), sizeof(void *)>::value + sizeof(size_type);
++ return (std::numeric_limits<size_type>::max() - POD_size) / alloc_size();
++ }
++
+ static void * & nextof(void * const ptr)
+ { //! \returns Pointer dereferenced.
+@@ -377,5 +388,7 @@
+ //! 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.
++ //! \param nmax_size is the maximum number of chunks to allocate in one block.
++ set_next_size(nnext_size);
++ set_max_size(nmax_size);
+ }
+
+@@ -400,7 +413,7 @@
+ }
+ 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.
+- //! \returns nnext_size.
+- next_size = start_size = 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.
++ BOOST_USING_STD_MIN();
++ next_size = start_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(nnext_size, max_chunks());
+ }
+ size_type get_max_size() const
+@@ -410,5 +423,6 @@
+ void set_max_size(const size_type nmax_size)
+ { //! Set max_size.
+- max_size = nmax_size;
++ BOOST_USING_STD_MIN();
++ max_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(nmax_size, max_chunks());
+ }
+ size_type get_requested_size() const
+@@ -713,7 +727,7 @@
+ BOOST_USING_STD_MIN();
+ if(!max_size)
+- next_size <<= 1;
++ set_next_size(next_size << 1);
+ else if( next_size*partition_size/requested_size < max_size)
+- next_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size*requested_size/ partition_size);
++ set_next_size(min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size * requested_size / partition_size));
+
+ // initialize it,
+@@ -753,7 +767,7 @@
+ BOOST_USING_STD_MIN();
+ if(!max_size)
+- next_size <<= 1;
++ set_next_size(next_size << 1);
+ else if( next_size*partition_size/requested_size < max_size)
+- next_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size*requested_size/ partition_size);
++ set_next_size(min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size * requested_size / partition_size));
+
+ // initialize it,
+@@ -797,4 +811,6 @@
+ //! \returns Address of chunk n if allocated ok.
+ //! \returns 0 if not enough memory for n chunks.
++ if (n > max_chunks())
++ return 0;
+
+ const size_type partition_size = alloc_size();
+@@ -845,7 +861,7 @@
+ BOOST_USING_STD_MIN();
+ if(!max_size)
+- next_size <<= 1;
++ set_next_size(next_size << 1);
+ else if( next_size*partition_size/requested_size < max_size)
+- next_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size*requested_size/ partition_size);
++ set_next_size(min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size * requested_size / partition_size));
+
+ // insert it into the list,
+Index: libs/pool/test/test_bug_6701.cpp
+===================================================================
+--- a/libs/pool/test/test_bug_6701.cpp (revision 78326)
++++ b/libs/pool/test/test_bug_6701.cpp (revision 78326)
+@@ -0,0 +1,27 @@
++/* Copyright (C) 2012 Étienne Dupuis
++*
++* Use, modification and distribution is subject to the
++* Boost Software License, Version 1.0. (See accompanying
++* file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
++*/
++
++// Test of bug #6701 (https://svn.boost.org/trac/boost/ticket/6701)
++
++#include <boost/pool/object_pool.hpp>
++#include <boost/limits.hpp>
++
++int main()
++{
++ boost::pool<> p(1024, std::numeric_limits<size_t>::max() / 768);
++
++ void *x = p.malloc();
++ BOOST_ASSERT(!x);
++
++ BOOST_ASSERT(std::numeric_limits<size_t>::max() / 1024 >= p.get_next_size());
++ BOOST_ASSERT(std::numeric_limits<size_t>::max() / 1024 >= p.get_max_size());
++
++ void *y = p.ordered_malloc(std::numeric_limits<size_t>::max() / 768);
++ BOOST_ASSERT(!y);
++
++ return 0;
++}