import boost-1.66.0-10.el8

This commit is contained in:
CentOS Sources 2020-11-03 07:03:09 -05:00 committed by Andrew Lukoshko
parent c94f0e8669
commit 31c7434bf4
4 changed files with 110 additions and 1 deletions

View File

@ -0,0 +1,25 @@
From 35ce23a327648a225f5c768a79890a761b9dbe27 Mon Sep 17 00:00:00 2001
From: Jonathan Wakely <boost@kayari.org>
Date: Wed, 10 Oct 2018 13:47:13 +0100
Subject: [PATCH] Use correct sizeof in malloc call
This is allocating space for `nel` objects of type `ITEM*` so it should use `sizeof(ITEM*)` not `sizeof(ITEM**)`.
In practice the values are the same, but using the correct type is better anyway, and now matches the same calculation in the `memset` call in the following statement.
---
src/engine/hash.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/engine/hash.c b/src/engine/hash.c
index 2fa12030b8..f3dcef88a5 100644
--- a/tools/build/src/engine/hash.c
+++ b/tools/build/src/engine/hash.c
@@ -248,7 +248,7 @@ static void hashrehash( struct hash * hp )
BJAM_FREE( (char *)hp->tab.base );
hp->tab.nel = hp->items.nel * hp->bloat;
- hp->tab.base = (ITEM * *)BJAM_MALLOC( hp->tab.nel * sizeof( ITEM * * ) );
+ hp->tab.base = (ITEM * *)BJAM_MALLOC( hp->tab.nel * sizeof( ITEM * ) );
memset( (char *)hp->tab.base, '\0', hp->tab.nel * sizeof( ITEM * ) );

View File

@ -0,0 +1,28 @@
From 8ff11a8eccc41914478e92231500fc47fefa6779 Mon Sep 17 00:00:00 2001
From: Jonathan Wakely <boost@kayari.org>
Date: Wed, 10 Oct 2018 17:17:10 +0100
Subject: [PATCH] Fix memory leak
If vsnprintf returns -1 then the buffer should be freed before returning.
---
src/engine/debugger.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/engine/debugger.c b/src/engine/debugger.c
index 3c811b4557..d849d064a9 100644
--- a/tools/build/src/engine/debugger.c
+++ b/tools/build/src/engine/debugger.c
@@ -860,10 +860,11 @@ static const char * debug_format_message( const char * format, va_list vargs )
result = vsnprintf( buf, sz, format, args );
#endif
va_end( args );
+ if ( 0 <= result && result < sz )
+ return buf;
+ free( buf );
if ( result < 0 )
return 0;
- if ( result < sz ) return buf;
- free( buf );
sz = result + 1;
}
}

View File

@ -0,0 +1,32 @@
From 5e61a97a0b56d3d4121d3cbb6b85032f9839545a Mon Sep 17 00:00:00 2001
From: nre <nre@ableton.com>
Date: Thu, 22 Dec 2016 13:25:35 +0100
Subject: [PATCH] Fix compiler error with release builds on VS2015
When using MSVC compiler optimization, using param_not_found() causes
compiler error C4172: returning address of local variable or temporary
---
include/boost/graph/named_function_params.hpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/boost/graph/named_function_params.hpp b/include/boost/graph/named_function_params.hpp
index a9a9add6c..4842dc954 100644
--- a/include/boost/graph/named_function_params.hpp
+++ b/include/boost/graph/named_function_params.hpp
@@ -228,6 +228,7 @@ BOOST_BGL_DECLARE_NAMED_PARAMS
};
struct param_not_found {};
+ static param_not_found g_param_not_found;
template <typename Tag, typename Args>
struct get_param_type:
@@ -237,7 +238,7 @@ BOOST_BGL_DECLARE_NAMED_PARAMS
inline
const typename lookup_named_param_def<Tag, Args, param_not_found>::type&
get_param(const Args& p, Tag) {
- return lookup_named_param_def<Tag, Args, param_not_found>::get(p, param_not_found());
+ return lookup_named_param_def<Tag, Args, param_not_found>::get(p, g_param_not_found);
}
template <class P, class Default>

View File

@ -27,7 +27,7 @@ Name: boost
Summary: The free peer-reviewed portable C++ source libraries
Version: 1.66.0
%global version_enc 1_66_0
Release: 7%{?dist}
Release: 10%{?dist}
License: Boost and MIT and Python
%global toplev_dirname %{name}_%{version_enc}
@ -134,6 +134,15 @@ Patch87: boost-1.66.0-numpy3.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1630552
Patch88: boost-1.66-annobin-notes.patch
# https://github.com/boostorg/build/pull/350
Patch89: boost-1.66-build-malloc-sizeof.patch
# https://github.com/boostorg/build/pull/351
Patch90: boost-1.66-build-memory-leak.patch
# https://github.com/boostorg/graph/pull/84
Patch91: boost-1.66-graph-return-local-addr.patch
%bcond_with tests
%bcond_with docs_generated
@ -638,6 +647,9 @@ find ./boost -name '*.hpp' -perm /111 | xargs chmod a-x
%patch85 -p1
%patch87 -p1
%patch88 -p1
%patch89 -p1
%patch90 -p1
%patch91 -p2
%build
PYTHON3_ABIFLAGS=$(/usr/bin/python3-config --abiflags)
@ -1297,6 +1309,18 @@ fi
%{_mandir}/man1/bjam.1*
%changelog
* Tue Aug 04 2020 Jonathan Wakely <jwakely@redhat.com> - 1.66.0-10
- Revert changes for s390x support in Boost.Context
* Fri May 29 2020 Jonathan Wakely <jwakely@redhat.com> - 1.66.0-9
- Actually apply the patches added to the spec in 1.66.0-8
* Fri May 01 2020 Jonathan Wakely <jwakely@redhat.com> - 1.66.0-8
- Add patches from IBM for s390x support in Boost.Context (#1782292)
* Fri Jan 31 2020 Jonathan Wakely <jwakely@redhat.com> - 1.66.0-8
- Add patches to fix covscan defects (#1638070)
* Tue Nov 19 2019 Jonathan Wakely <jwakely@redhat.com> - 1.66.0-7
- Add patch to annotate objects built from assembly code (#1630552)