summaryrefslogtreecommitdiff
path: root/dev-libs/boost
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
parentab3da91fb6c91a9df52fff8f991570f456fd3c7a (diff)
gentoo christmass resync : 25.12.2020
Diffstat (limited to 'dev-libs/boost')
-rw-r--r--dev-libs/boost/Manifest7
-rw-r--r--dev-libs/boost/boost-1.74.0-r2.ebuild (renamed from dev-libs/boost/boost-1.72.0-r2.ebuild)29
-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
6 files changed, 142 insertions, 147 deletions
diff --git a/dev-libs/boost/Manifest b/dev-libs/boost/Manifest
index ce0eecc14c0f..b8490432b74b 100644
--- a/dev-libs/boost/Manifest
+++ b/dev-libs/boost/Manifest
@@ -1,14 +1,11 @@
AUX boost-1.71.0-build-auto_index-tool.patch 265 BLAKE2B 05e52ca716522db7bb11b481576a08138be826f7383a689a6c0725d491a244dc8697fc39fac1a79e4639ba51b3a3eb7ee2f2e11a20883de0ecd3dd3c2fc2c9cd SHA512 28952e7cd791678be0963beb0a29e3e40b54a8c3618c66a8b8d21ab63c414771cfa1e9961f08c0b3818bd4c311c122e777109e15002a71230b0c3c9dbc4d6075
AUX boost-1.71.0-context-x32.patch 1116 BLAKE2B 16b6ddbdc47d72d5afd39e61441f9f094dff8db46bd7fa4e04e5a8b132c8894c51db506d20356c352022f42d5b9a9923f23c5db2b0f9fa1c64ceeb4e50e16be1 SHA512 cf76691d4adbc4b43f468c587fea23c43e1b337ba7eebff2c856b0403bf32b78826f483faca25a4459c1d47eabbd5b67c65863a4d44407990178022433f718bf
AUX boost-1.71.0-disable_icu_rpath.patch 1077 BLAKE2B c4549b7a706cd934392bdafb44ee89987534d5cca48060b955a4b998f0ac6c8a96b5c0d6f5d46476a0225ba6e66fabc095ec12c0f0c43a60c7147ef922e8a2ae SHA512 7095d94def1ee04f009f0c2e84d0450705211793f6d18ac4a3e0fb673a36127282f31172a7f571ed89f4128b6ffbc38d850e6105a5ad5224d42749557db41ee0
-AUX boost-1.72.0-boost-mpi-python.patch 1703 BLAKE2B b797f66c07bcec021e0a9a169cfddf8572828cd94114ff0dc40e9f08f9e5041f5cef3a8d0400cf5cc447bb75cf9e1c1c4d500930d154f34920b3501eb991eccb SHA512 61e9ef28b40f4226f09f235d59bd2d1ad571530b78c3fb50fd1f2bc47c185cc7cbd72b469fddcd6795a8578f3ba0b6abf12d8f175806e7b0d29cdd6223c145aa
-AUX boost-1.72.0-missing-serialization-split_member-include.patch 992 BLAKE2B 103b669670ff1365837c4590bbba6ec112ef8f185115a60cd853cead370c514517950e6105a4f39c030d8c0931352c44eb7d03c6790ab88c6978acfa02e3a142 SHA512 b2d9e870545c8509abda1110e8de3807cec72373fd5539edabf83825b9fd893562835e7557ea74c309a02e245e9cf80e567b39bf08a5e98c9d3124cd8b10e064
-AUX boost-1.72.0-revert-cease-dependence-on-range.patch 1687 BLAKE2B 9419cf7b50359c17f6226e0706e64a4637d835172a742807349536fb87731912929148810e5abb33c6005583bf6077283c2e6c453a911ea7922266f616b60ea4 SHA512 9b53d2fe2dddd592e43db03c26fadd6c07d4c45a980ae4c775b7a914346a3914f6e0c3ef42dad5e2ea4568afb86c9967e09444ff609cfba1e1d39f4980b22ad6
AUX boost-1.73-boost-mpi-python-PEP-328.patch 396 BLAKE2B 5f08ce2eab46f2d108166afef086382dc9cd9a5305435cf437fa3ae505736979664357aa23cc51b2a74bee6aae46d94a671056037578562846e900fd2c7e65e8 SHA512 fa55d1da17bd110db2c9a16dce4da267a62ef10c13a6dc3aa6afd3b33e9a18499266b4411d292533b1c691e3bf0309fa1aab8ec19e7775a7835d89275183e6f2
AUX boost-1.73-boost-python-cleanup.patch 3414 BLAKE2B 5167f69bbaf47be548a522638ac4a2dc9bc355d5f237738f9775b2e25a5050b6faacc5f1ce60a484f1664159ca9ba8937db3d9f8e4f0fd76117ff7f61c65cd37 SHA512 b5406e6a31a7feec590f2ee0195fc96e8830b51c270c74162d01b86b748bc11fd353ae97179e0096502b6d7dae69cdc0a478f513e2d7622455bf23a9b0da390b
AUX boost-1.73-property-tree-include.patch 1832 BLAKE2B 7488cf768209bde32af608f366ad0d9a392bb36e6b9e4c7ac13a262eedea668fb58667f41cd089c91f43fee4a6a68e442c2e627ffa2341c44274b4f4f7f644db SHA512 a18fa18388b74371aa3d3826621df90e8c8f6d2c6b9cf25bc9f7761e98817cc9252ccd43fa5a374136f257e9a0c1f927eb9912d0715bb1de94b3e92af957d84a
-DIST boost_1_72_0.tar.bz2 106907358 BLAKE2B ab270a0e3cb24da687d86785e2d2e6d7731b4dbc07bd839eadb642dfa5a428ad584acb1f3529661a8de9a986008ff3427491041059ea2b742348d02e00761cd8 SHA512 63bbd1743e7c904b2e69fdc2eafd1c2a8a30fd70d960dcd366059d0100f000cb605d56cbd9397bb18421631f1c9552a772c434d0f0caddbe56302273f51fd1f6
+AUX boost-1.74-CVE-2012-2677.patch 4965 BLAKE2B 74cef075cd0aa4d4425e75d437a59c19e20325cc33c9c8fb206bdcf87efbafa6d28c6ebcd8b70f88f12e32b68b492ac6b985ccef703c61439661a194983b9ad9 SHA512 c8e6758840b58358b676226ef9f498b9e72cbeedee83cd6c8ea0608a6bc1466bedeba5b7a92d1a608c3a2788cb3c0444203e70995e3b3123198bf68081b477b9
DIST boost_1_74_0.tar.bz2 109600630 BLAKE2B 2982f64fccf6fdb3b4b74452e603f459242d7abb42df4162278d9b558b637786a2eb97442126967b19088d591777c64ced8f60a23e71eaa0b7545e80f800de63 SHA512 4ec9c1164ec9b95ce46ba1c073e586c94b3882dce5b7347ea14bbef0c1da230e12aa5328a501ce38cae1b1d7623daa3246325625899179b4cc309242540982a4
-EBUILD boost-1.72.0-r2.ebuild 11331 BLAKE2B f7294b4da3f7ec6e91766f0ca4439ff24b12f7eb16e1875fdb29d276396bd3c48a094d7fd909c49fce9013118f10a13606d9a8da444f1e9268c6bb9a1c12672a SHA512 1662769daf62586acf8894bf46ff506721054001b2f130f3818575c661bd9de10e1b433bae0f35bc4aca8f04ead7a84b5a8c4ac15cda8bee0c7e0829449b1b66
EBUILD boost-1.74.0-r1.ebuild 11224 BLAKE2B 4251b39853cf0d542ab3e38d6a193d2ed569cb1e2989daf8c7733a0093762bfcba61ecf5840261aadb3be11a3e9ce420a20bd6a1cdefd3a22d89801e4a1e3eaf SHA512 c40ac4570f08537f46147771c23b0096349128fa3cb74d68d98d0cf5e787e8a71048888341ef0c014a303b7230de71af43a7e65c683678debc8e1d4d2d31eafa
+EBUILD boost-1.74.0-r2.ebuild 11278 BLAKE2B a46f5b7900febf66e128314c956105234d17749a158680f42e1b47ec1089e8753b070d78d3b80f14e88534ab6769d2faf2626b54a74e7f939330df1d2f9d23eb SHA512 9de9e857bb583655f761c0d4afd1a1d6401be85be11801481d914d282c6b1020da51b713cf34ef3d6f45908ca7be40f92d5dec97d3df4a7255dbb6f94475be0a
MISC metadata.xml 1398 BLAKE2B ddaab460cad149df5f91c1a37eb7ffaa6a2b90e1062f268925fd3e0db1403d3447963c27fcd72847319e8510723a1a245be398d50a1e317662f59f593991ff0a SHA512 ed8530328af7bef694be2af7d3ba0c83198f769223b35ee5c1a2463cf50c97e964f7a4d8361f5091e9994fe0bff000534b6c5d5e5b517d38d101061026bd01bd
diff --git a/dev-libs/boost/boost-1.72.0-r2.ebuild b/dev-libs/boost/boost-1.74.0-r2.ebuild
index 2556d26576ee..de5aba9c7e6d 100644
--- a/dev-libs/boost/boost-1.72.0-r2.ebuild
+++ b/dev-libs/boost/boost-1.74.0-r2.ebuild
@@ -3,7 +3,7 @@
EAPI=7
-PYTHON_COMPAT=( python3_{6,7,8} )
+PYTHON_COMPAT=( python3_{6,7,8,9} )
inherit flag-o-matic multiprocessing python-r1 toolchain-funcs multilib-minimal
@@ -16,7 +16,7 @@ SRC_URI="https://dl.bintray.com/boostorg/release/${PV}/source/boost_${MY_PV}.tar
LICENSE="Boost-1.0"
SLOT="0/${PV}" # ${PV} instead ${MAJOR_V} due to bug 486122
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x86-solaris ~x86-winnt"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x86-solaris ~x86-winnt"
IUSE="bzip2 context debug doc icu lzma +nls mpi numpy python static-libs +threads tools zlib zstd"
REQUIRED_USE="
mpi? ( threads )
@@ -32,6 +32,7 @@ RESTRICT="test"
RDEPEND="
!app-admin/eselect-boost
!dev-libs/boost-numpy
+ !<dev-libs/leatherman-1.12.0-r1
bzip2? ( app-arch/bzip2:=[${MULTILIB_USEDEP}] )
icu? ( >=dev-libs/icu-3.6:=[${MULTILIB_USEDEP}] )
!icu? ( virtual/libiconv[${MULTILIB_USEDEP}] )
@@ -52,12 +53,14 @@ PATCHES=(
"${FILESDIR}"/${PN}-1.71.0-disable_icu_rpath.patch
"${FILESDIR}"/${PN}-1.71.0-context-x32.patch
"${FILESDIR}"/${PN}-1.71.0-build-auto_index-tool.patch
- # Bug 703294, incomplete Boost.Serialization refactoring
- "${FILESDIR}"/${PN}-1.72.0-missing-serialization-split_member-include.patch
- # Bug 703036, per python-impl Boost.MPI
- "${FILESDIR}"/${PN}-1.72.0-boost-mpi-python.patch
- # Bug 704128, missing include on Boost.Ranges
- "${FILESDIR}"/${PN}-1.72.0-revert-cease-dependence-on-range.patch
+ # upstream unresponsive to pull request
+ # https://github.com/boostorg/python/pull/286
+ "${FILESDIR}"/${PN}-1.73-boost-python-cleanup.patch
+ # Boost.MPI's __init__.py doesn't work on Py3
+ "${FILESDIR}"/${PN}-1.73-boost-mpi-python-PEP-328.patch
+ # Remove annoying #pragma message
+ "${FILESDIR}"/${PN}-1.73-property-tree-include.patch
+ "${FILESDIR}"/${PN}-1.74-CVE-2012-2677.patch
)
python_bindings_needed() {
@@ -222,14 +225,12 @@ multilib_src_install_all() {
if use python; then
if use mpi; then
move_mpi_py_into_sitedir() {
- local pyver="${EPYTHON#python}"
python_moduleinto boost
- python_domodule "${ED}"/usr/$(get_libdir)/mpi${pyver/./}.so
- rm "${ED}"/usr/$(get_libdir)/mpi${pyver/./}* || die
- dosym mpi${pyver/./}.so $(python_get_sitedir)/boost/mpi.so
+ python_domodule "${S}"/libs/mpi/build/__init__.py
+
+ python_domodule "${ED}"/usr/$(get_libdir)/boost-${EPYTHON}/mpi.so
+ rm -r "${ED}"/usr/$(get_libdir)/boost-${EPYTHON} || die
- # create a proper python package
- touch "${D}"/$(python_get_sitedir)/boost/__init__.py || die
python_optimize
}
python_foreach_impl move_mpi_py_into_sitedir
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;
++}