Compare commits
20 Commits
master
...
openEuler-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9de55bc3ff | ||
|
|
2cb662a3cb | ||
|
|
8a396af84b | ||
|
|
3f35645cbe | ||
|
|
3e2ad10ff1 | ||
|
|
60fa0ae061 | ||
|
|
e386591796 | ||
|
|
c8e96fd0cc | ||
|
|
26e2accfef | ||
|
|
dc06bf34f6 | ||
|
|
2f05304772 | ||
|
|
128c3dfbb1 | ||
|
|
843c2f969b | ||
|
|
ed76d52cfa | ||
|
|
5feb89d230 | ||
|
|
153e929384 | ||
|
|
8048d42ad7 | ||
|
|
6cf6f5f56b | ||
|
|
80d2eba124 | ||
|
|
399c456d92 |
@ -0,0 +1,45 @@
|
||||
From 354e02f1413e6a429174e2c1681cc825361c2159 Mon Sep 17 00:00:00 2001
|
||||
From: jzmaddock <john@johnmaddock.co.uk>
|
||||
Date: Wed, 20 Oct 2021 12:12:57 +0100
|
||||
Subject: [PATCH] Correct stack unwinding inside recursions when seeing (*SKIP).
|
||||
|
||||
Fixes https://github.com/boostorg/regex/issues/152.
|
||||
|
||||
Signed-off-by: zhangyiru <zhangyiru3@huawei.com>
|
||||
Signed-off-by: jzmaddock <john@johnmaddock.co.uk>
|
||||
---
|
||||
boost/regex/v4/perl_matcher_non_recursive.hpp | 3 ++-
|
||||
libs/regex/test/regress/test_perl_ex.cpp | 3 +++
|
||||
2 files changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/boost/regex/v4/perl_matcher_non_recursive.hpp b/boost/regex/v4/perl_matcher_non_recursive.hpp
|
||||
index eb470a78d..e5453e9e7 100644
|
||||
--- a/boost/regex/v4/perl_matcher_non_recursive.hpp
|
||||
+++ b/boost/regex/v4/perl_matcher_non_recursive.hpp
|
||||
@@ -427,7 +427,8 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_startmark()
|
||||
{
|
||||
// Must be unwinding from a COMMIT/SKIP/PRUNE and the independent
|
||||
// sub failed, need to unwind everything else:
|
||||
- while(unwind(false));
|
||||
+ while (m_backup_state->state_id)
|
||||
+ unwind(false);
|
||||
return false;
|
||||
}
|
||||
#if !defined(BOOST_NO_EXCEPTIONS)
|
||||
diff --git a/libs/regex/test/regress/test_perl_ex.cpp b/libs/regex/test/regress/test_perl_ex.cpp
|
||||
index 6a53256d1..ff74a0742 100644
|
||||
--- a/libs/regex/test/regress/test_perl_ex.cpp
|
||||
+++ b/libs/regex/test/regress/test_perl_ex.cpp
|
||||
@@ -997,6 +997,9 @@ void test_verbs()
|
||||
TEST_REGEX_SEARCH("AA+(*SKIP)(B|Z)|AC", perl, "AAAC", match_default, make_array(-2, -2));
|
||||
TEST_REGEX_SEARCH("AA+(*SKIP)B|C", perl, "AAAC", match_default, make_array(3, 4, -2, -2));
|
||||
|
||||
+ // https://github.com/boostorg/regex/issues/152
|
||||
+ TEST_REGEX_SEARCH("\\A((\x1f((?1) )?+)?+(*SKIP) *?(?2)*?)\\z", perl, "\x20\x1f\x1f\x20", match_default, make_array(-2, -2));
|
||||
+
|
||||
TEST_REGEX_SEARCH("^(?:aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})", perl, "aaaxxxxxx", match_default, make_array(0, 9, -2, -2));
|
||||
TEST_REGEX_SEARCH("^(?:aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})", perl, "aaa++++++", match_default, make_array(-2, -2));
|
||||
TEST_REGEX_SEARCH("^(?:aaa(*THEN)\\w{6}|bbb(*THEN)\\w{5}|ccc(*THEN)\\w{4}|\\w{3})", perl, "bbbxxxxx", match_default, make_array(0, 8, -2, -2));
|
||||
--
|
||||
2.27.0
|
||||
|
||||
42
backport-Disallow-repeating-a-case-change-group.patch
Normal file
42
backport-Disallow-repeating-a-case-change-group.patch
Normal file
@ -0,0 +1,42 @@
|
||||
From 370afe3f446c69a7ccc4c09f056272346afc264b Mon Sep 17 00:00:00 2001
|
||||
From: zhangyiru <zhangyiru3@huawei.com>
|
||||
Date: Thu, 14 Oct 2021 15:55:56 -0400
|
||||
Subject: [PATCH] Disallow repeating a case-change group
|
||||
|
||||
fix assertion failed: https://github.com/boostorg/regex/issues/151
|
||||
|
||||
Signed-off-by: zhangyiru <zhangyiru3@huawei.com>
|
||||
---
|
||||
boost/regex/v4/basic_regex_parser.hpp | 9 ++++++++-
|
||||
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/boost/regex/v4/basic_regex_parser.hpp b/boost/regex/v4/basic_regex_parser.hpp
|
||||
index 6c7065f05..2ce615943 100644
|
||||
--- a/boost/regex/v4/basic_regex_parser.hpp
|
||||
+++ b/boost/regex/v4/basic_regex_parser.hpp
|
||||
@@ -1042,6 +1042,7 @@ bool basic_regex_parser<charT, traits>::parse_repeat(std::size_t low, std::size_
|
||||
case syntax_element_jump:
|
||||
case syntax_element_startmark:
|
||||
case syntax_element_backstep:
|
||||
+ case syntax_element_toggle_case:
|
||||
// can't legally repeat any of the above:
|
||||
fail(regex_constants::error_badrepeat, m_position - m_base);
|
||||
return false;
|
||||
@@ -3116,7 +3117,13 @@ bool basic_regex_parser<charT, traits>::unwind_alts(std::ptrdiff_t last_paren_st
|
||||
m_alt_jumps.pop_back();
|
||||
this->m_pdata->m_data.align();
|
||||
re_jump* jmp = static_cast<re_jump*>(this->getaddress(jump_offset));
|
||||
- BOOST_ASSERT(jmp->type == syntax_element_jump);
|
||||
+ if (jmp->type != syntax_element_jump)
|
||||
+ {
|
||||
+ // Something really bad happened, this used to be an assert,
|
||||
+ // but we'll make it an error just in case we should ever get here.
|
||||
+ fail(regex_constants::error_unknown, this->m_position - this->m_base, "Internal logic failed while compiling the expression, probably you added a repeat to something non-repeatable!");
|
||||
+ return false;
|
||||
+ }
|
||||
jmp->alt.i = this->m_pdata->m_data.size() - jump_offset;
|
||||
}
|
||||
return true;
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@ -0,0 +1,27 @@
|
||||
From db3c106f1e80e67f9ed80ee276c5e080519290ad Mon Sep 17 00:00:00 2001
|
||||
From: zhangyiru <zhangyiru3@huawei.com>
|
||||
Date: Thu, 14 Oct 2021 15:39:19 -0400
|
||||
Subject: [PATCH] increase used_block_count when use_ put_mem_block
|
||||
|
||||
fix memleak problem: https://github.com/boostorg/regex/issues/153
|
||||
|
||||
Signed-off-by: zhangyiru <zhangyiru3@huawei.com>
|
||||
---
|
||||
boost/regex/v4/perl_matcher_non_recursive.hpp | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/boost/regex/v4/perl_matcher_non_recursive.hpp b/boost/regex/v4/perl_matcher_non_recursive.hpp
|
||||
index eb470a78d..54ce751da 100644
|
||||
--- a/boost/regex/v4/perl_matcher_non_recursive.hpp
|
||||
+++ b/boost/regex/v4/perl_matcher_non_recursive.hpp
|
||||
@@ -1363,6 +1363,7 @@ bool perl_matcher<BidiIterator, Allocator, traits>::unwind_repeater_counter(bool
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::unwind_extra_block(bool)
|
||||
{
|
||||
+ ++used_block_count;
|
||||
saved_extra_block* pmp = static_cast<saved_extra_block*>(m_backup_state);
|
||||
void* condemmed = m_stack_base;
|
||||
m_stack_base = pmp->base;
|
||||
--
|
||||
2.27.0
|
||||
|
||||
144
bjam
Normal file
144
bjam
Normal file
@ -0,0 +1,144 @@
|
||||
.TH "b2" 1 "Sat Nov 19 2011" "Doxygen" \" -*- nroff -*-
|
||||
.ad l
|
||||
.nh
|
||||
.SH NAME
|
||||
b2 \- Command-line utility to build Boost-related C++ projects with Boost\&.Build
|
||||
.SH "SYNOPSIS"
|
||||
.PP
|
||||
\fBb2\fP \fC[-a] [-dx] [-fx] [-jx] [-lx] [-n] [-ox] [-px] [-q] [-sx=y] [-tx] [-v] [--x]\fP
|
||||
.PP
|
||||
\fIb2\fP accepts the following options:
|
||||
.PP
|
||||
\fB-a\fP
|
||||
.br
|
||||
Build all targets, even if they are current
|
||||
.PP
|
||||
\fB-dx\fP
|
||||
.br
|
||||
Set the debug level to x (0-9)
|
||||
.PP
|
||||
\fB-fx\fP
|
||||
.br
|
||||
Read x instead of Jambase
|
||||
.PP
|
||||
\fB-jx\fP
|
||||
.br
|
||||
Run up to x shell commands concurrently
|
||||
.PP
|
||||
\fB-lx\fP
|
||||
.br
|
||||
Limit actions to x number of seconds after which they are stopped
|
||||
.PP
|
||||
\fB-n\fP
|
||||
.br
|
||||
Don't actually execute the updating actions
|
||||
.PP
|
||||
\fB-ox\fP
|
||||
.br
|
||||
Write the updating actions to file x
|
||||
.PP
|
||||
\fB-px\fP
|
||||
.br
|
||||
x=0, pipes action stdout and stderr merged into action output
|
||||
.PP
|
||||
\fB-q\fP
|
||||
.br
|
||||
Quit quickly as soon as a target fails
|
||||
.PP
|
||||
\fB-sx=y\fP
|
||||
.br
|
||||
Set variable x=y, overriding environment
|
||||
.PP
|
||||
\fB-tx\fP
|
||||
.br
|
||||
Rebuild x, even if it is up-to-date
|
||||
.PP
|
||||
\fB-v\fP
|
||||
.br
|
||||
Print the version of b2 and exit
|
||||
.PP
|
||||
\fB--x\fP
|
||||
.br
|
||||
Option is ignored
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
This section provides the information necessary to create your own projects using \fIBoost\&.Build\fP The information provided here is relatively high-level, and Chapter 6, Reference as well as the on-line help system must be used to obtain low-level documentation (see --help)
|
||||
.PP
|
||||
\fIBoost\&.Build\fP actually consists of two parts - \fIBoost\&.Jam\fP, a build engine with its own interpreted language, and \fIBoost\&.Build\fP itself, implemented in \fIBoost\&.Jam's\fP language\&. The chain of events when you type b2 on the command line is as follows:
|
||||
.IP "\(bu" 2
|
||||
\fIBoost\&.Jam\fP tries to find \fIBoost\&.Build\fP and loads the top-level module\&. The exact process is described in the section called “Initialization”
|
||||
.PP
|
||||
.PP
|
||||
.IP "\(bu" 2
|
||||
The top-level module loads user-defined configuration files, \fIuser-config\&.jam\fP and \fIsite-config\&.jam\fP, which define available toolsets
|
||||
.PP
|
||||
.PP
|
||||
.IP "\(bu" 2
|
||||
The \fIJamfile\fP in the current directory is read That in turn might cause reading of further Jamfiles\&. As a result, a tree of projects is created, with targets inside projects
|
||||
.PP
|
||||
.PP
|
||||
.IP "\(bu" 2
|
||||
Finally, using the build request specified on the command line, \fIBoost\&.Build\fP decides which targets should be built and how\&. That information is passed back to \fIBoost\&.Jam\fP, which takes care of actually running the scheduled build action commands
|
||||
.PP
|
||||
.PP
|
||||
So, to be able to successfully use \fIBoost\&.Build\fP, you need to know only four things:
|
||||
.IP "\(bu" 2
|
||||
How to configure \fIBoost\&.Build\fP (http://www.boost.org/boost-build2/doc/html/bbv2/overview/configuration.html)
|
||||
.IP "\(bu" 2
|
||||
How to declare targets in Jamfiles (http://www.boost.org/boost-build2/doc/html/bbv2/overview/targets.html)
|
||||
.IP "\(bu" 2
|
||||
How the build process works (http://www.boost.org/boost-build2/doc/html/bbv2/overview/build_process.html)
|
||||
.PP
|
||||
.PP
|
||||
Some Basics about the \fIBoost\&.Jam\fP language\&. See the section called “Boost\&.Jam Language” (http://www.boost.org/boost-build2/doc/html/bbv2/overview/jam_language.html)
|
||||
.SH "CONCEPTS"
|
||||
.PP
|
||||
\fIBoost\&.Build\fP has a few unique concepts that are introduced in this section\&. The best way to explain the concepts is by comparison with more classical build tools
|
||||
.PP
|
||||
When using any flavour of make, you directly specify targets and commands that are used to create them from other target\&. The below example creates a\&.o from a\&.c using a hardcoded compiler invocation command
|
||||
.PP
|
||||
a\&.o: a\&.c
|
||||
.br
|
||||
g++ -o a\&.o -g a\&.c
|
||||
.PP
|
||||
This is rather low-level description mechanism and it is hard to adjust commands, options, and sets of created targets depending on the used compiler and operating system\&.
|
||||
.PP
|
||||
To improve portability, most modern build system provide a set of higher-level functions that can be used in build description files\&. Consider this example:
|
||||
.PP
|
||||
add_program ('a', 'a\&.c')
|
||||
.br
|
||||
.PP
|
||||
This is a function call that creates targets necessary to create executable file from source file a\&.c\&. Depending on configured properties, different commands line may be used\&. However, \fIadd_program\fP is higher-level, but rather thin level All targets are created immediately when build description is parsed, which makes it impossible to perform multi-variant builds\&. Often, change in any build property requires complete reconfiguration of the build tree
|
||||
.PP
|
||||
In order to support true multivariant builds, Boost\&.Build introduces the concept of metatarget—object that is created when build description is parsed and can be later called with specific build properties to generate actual targets
|
||||
.PP
|
||||
Consider an example:
|
||||
.PP
|
||||
exe a : a\&.cpp ;
|
||||
.br
|
||||
.PP
|
||||
When this declaration is parsed, \fIBoost\&.Build\fP creates a metatarget, but does not yet decides what files must be created, or what commands must be used\&. After all build files are parsed, Boost\&.Build considers properties requested on the command line\&. Supposed you have invoked \fIBoost\&.Build\fP with:
|
||||
.PP
|
||||
\fIb2\fP toolset=gcc toolset=msvc
|
||||
.br
|
||||
.PP
|
||||
In that case, the metatarget will be called twice, once with toolset=gcc and once with toolset=msvc\&. Both invocations will produce concrete targets, that will have different extensions and use different command lines\&. Another key concept is build property\&. Build property is a variable that affects the build process\&. It can be specified on the command line, and is passed when calling a metatarget
|
||||
.PP
|
||||
While all build tools have a similar mechanism, \fIBoost\&.Build\fP differs by requiring that all build properties are declared in advance, and providing a large set of properties with portable semantics
|
||||
.PP
|
||||
The final concept is property propagation\&. Boost\&.Build does not require that every metatarget is called with the same properties\&. Instead, the 'top-level' metatargets are called with the properties specified on the command line Each metatarget can elect to augment or override some properties (in particular, using the requirements mechanism, see the section called “Requirements”: http://www.boost.org/boost-build2/doc/html/bbv2/overview/targets.html#bbv2.overview.targets.requirements) Then, the dependency metatargets are called with modified properties and produce concrete targets that are then used in build process Of course, dependency metatargets maybe in turn modify build properties and have dependencies of their own\&.
|
||||
.PP
|
||||
For more in-depth treatment of the requirements and concepts, you may refer to SYRCoSE 2009 Boost\&.Build article (http://syrcose.ispras.ru/2009/files/04_paper.pdf)\&.
|
||||
.SH "SEE ALSO"
|
||||
.PP
|
||||
\fBboost-libraries\fP(3)
|
||||
.SH "SUPPORT"
|
||||
.PP
|
||||
Please report any bugs to https://svn.boost.org/trac/boost/
|
||||
.SH "COPYRIGHT"
|
||||
.PP
|
||||
Boost Software License - Version 1\&.0 - August 17th, 2003
|
||||
.PP
|
||||
See the LICENSE_1_0\&.txt file for more information on that license, or directly on Internet:
|
||||
.br
|
||||
http://www.boost.org/LICENSE_1_0.txt
|
||||
24
boost-1.50.0-fix-non-utf8-files.patch
Normal file
24
boost-1.50.0-fix-non-utf8-files.patch
Normal file
@ -0,0 +1,24 @@
|
||||
diff --git a/libs/units/example/autoprefixes.cpp b/libs/units/example/autoprefixes.cpp
|
||||
index 9966766c6..090be0906 100644
|
||||
--- a/libs/units/example/autoprefixes.cpp
|
||||
+++ b/libs/units/example/autoprefixes.cpp
|
||||
@@ -67,7 +67,7 @@ struct thing_base_unit : boost::units::base_unit<thing_base_unit, boost::units::
|
||||
struct euro_base_unit : boost::units::base_unit<euro_base_unit, boost::units::dimensionless_type, 5>
|
||||
{
|
||||
static constexpr const char* name() { return("EUR"); }
|
||||
- static constexpr const char* symbol() { return("€"); }
|
||||
+ static constexpr const char* symbol() { return("€"); }
|
||||
};
|
||||
|
||||
int main()
|
||||
@@ -140,7 +140,7 @@ int main()
|
||||
|
||||
quantity<euro_base_unit::unit_type> ce = 2048. * euro_base_unit::unit_type();
|
||||
cout << name_format << engineering_prefix << ce << endl; // 2.048 kiloEUR
|
||||
- cout << symbol_format << engineering_prefix << ce << endl; // 2.048 k€
|
||||
+ cout << symbol_format << engineering_prefix << ce << endl; // 2.048 k€
|
||||
|
||||
|
||||
return 0;
|
||||
--
|
||||
2.19.1
|
||||
33
boost-1.58.0-pool-test_linking.patch
Normal file
33
boost-1.58.0-pool-test_linking.patch
Normal file
@ -0,0 +1,33 @@
|
||||
diff -up boost_1_58_0/libs/pool/test/Jamfile.v2\~ boost_1_58_0/libs/pool/test/Jamfile.v2
|
||||
--- boost_1_57_0/libs/pool/test/Jamfile.v2~ 2015-07-17 11:36:16.362519826 +0100
|
||||
+++ boost_1_57_0/libs/pool/test/Jamfile.v2 2015-07-17 11:37:38.858847388 +0100
|
||||
@@ -22,18 +22,18 @@ import os ;
|
||||
import testing ;
|
||||
|
||||
test-suite pool :
|
||||
- [ run test_simple_seg_storage.cpp : : : <toolset>msvc:<cxxflags>-wd4267 ]
|
||||
- [ run test_pool_alloc.cpp ]
|
||||
- [ run pool_msvc_compiler_bug_test.cpp : : : <toolset>msvc:<cxxflags>-wd4512 ]
|
||||
- [ run test_msvc_mem_leak_detect.cpp ]
|
||||
- [ run test_bug_3349.cpp ]
|
||||
- [ run test_bug_4960.cpp ]
|
||||
+ [ run test_simple_seg_storage.cpp : : : <toolset>msvc:<cxxflags>-wd4267 <library>/boost/system//boost_system ]
|
||||
+ [ run test_pool_alloc.cpp <library>/boost/system//boost_system ]
|
||||
+ [ run pool_msvc_compiler_bug_test.cpp : : : <toolset>msvc:<cxxflags>-wd4512 <library>/boost/system//boost_system ]
|
||||
+ [ run test_msvc_mem_leak_detect.cpp : : : <library>/boost/system//boost_system ]
|
||||
+ [ run test_bug_3349.cpp : : : <library>/boost/system//boost_system ]
|
||||
+ [ run test_bug_4960.cpp : : : <library>/boost/system//boost_system ]
|
||||
[ run test_bug_1252.cpp : : :
|
||||
<toolset>clang:<cxxflags>-Wno-c++11-long-long
|
||||
<toolset>gcc:<cxxflags>-Wno-long-long
|
||||
- <toolset>pathscale:<cxxflags>-Wno-long-long ]
|
||||
- [ run test_bug_2696.cpp ]
|
||||
- [ run test_bug_5526.cpp ]
|
||||
+ <toolset>pathscale:<cxxflags>-Wno-long-long <library>/boost/system//boost_system ]
|
||||
+ [ run test_bug_2696.cpp : : : <library>/boost/system//boost_system ]
|
||||
+ [ run test_bug_5526.cpp : : : <library>/boost/system//boost_system ]
|
||||
[ run test_threading.cpp : : : <threading>multi <library>/boost/thread//boost_thread ]
|
||||
[ compile test_poisoned_macros.cpp ]
|
||||
;
|
||||
--
|
||||
2.19.1
|
||||
120
boost-1.58.0-pool.patch
Normal file
120
boost-1.58.0-pool.patch
Normal file
@ -0,0 +1,120 @@
|
||||
Index: boost/pool/pool.hpp
|
||||
===================================================================
|
||||
--- boost/pool/pool.hpp (revision 78317)
|
||||
+++ 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
|
||||
===================================================================
|
||||
--- libs/pool/test/test_bug_6701.cpp (revision 78326)
|
||||
+++ 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;
|
||||
+}
|
||||
20
boost-1.66.0-no-rpath.patch
Normal file
20
boost-1.66.0-no-rpath.patch
Normal file
@ -0,0 +1,20 @@
|
||||
--- boost_1_66_0/tools/build/src/tools/gcc.jam~ 2018-01-19 13:23:45.361330881 +0000
|
||||
+++ boost_1_66_0/tools/build/src/tools/gcc.jam 2018-01-19 13:23:45.362330880 +0000
|
||||
@@ -1191,7 +1191,7 @@ rule link ( targets * : sources * : prop
|
||||
|
||||
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)
|
||||
}
|
||||
|
||||
rule link.dll ( targets * : sources * : properties * )
|
||||
@@ -1204,7 +1204,7 @@ rule link.dll ( targets * : sources * :
|
||||
# Differs from 'link' above only by -shared.
|
||||
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)
|
||||
}
|
||||
|
||||
###
|
||||
@ -1,85 +0,0 @@
|
||||
name: boost
|
||||
old_version: 1.72.0
|
||||
new_version: 1.73.0
|
||||
interface_differences:
|
||||
- type: 'feature'
|
||||
item: StaticString
|
||||
diff: 社区增加新特性
|
||||
influence: 增加StaticString库
|
||||
- type: 'feature'
|
||||
item: Asio
|
||||
diff: 社区增加新特性
|
||||
influence: 增加ssl::host_name_verification,增加ssl::context构造函数,SSL依赖OpenSSL 1.0.2,ssl::context类会传播非EOF错误
|
||||
- type: 'feature'
|
||||
item: Assert
|
||||
diff: 社区增加新特性
|
||||
influence: Assert库增加source_location
|
||||
- type: 'feature'
|
||||
item: Atomic
|
||||
diff: 社区增加新特性
|
||||
influence: Atomic库增加atomic_ref、atomic_flag::test
|
||||
- type: 'feature'
|
||||
item: Conversion
|
||||
diff: 社区增加新特性
|
||||
influence: Conversion库增加boost::polymorphic_downcast
|
||||
- type: 'feature'
|
||||
item: data_time
|
||||
diff: 社区增加新特性
|
||||
influence: data_time支持constexpr
|
||||
- type: 'feature'
|
||||
item: Geometry
|
||||
diff: 社区增加新特性
|
||||
influence: Geometry增加d3::point_xyz模型
|
||||
- type: 'feature'
|
||||
item: GIL
|
||||
diff: 社区增加新特性
|
||||
influence: image类增加移动构造与移动赋值函数,any_image_view类增加size函数
|
||||
- type: 'feature'
|
||||
item: Histogram
|
||||
diff: 社区增加新特性
|
||||
influence: reduce算法增加crop命令,reduce的slice命令支持category,增加count累加器,sum算法增加新参数
|
||||
- type: 'feature'
|
||||
item: IO
|
||||
diff: 社区增加新特性
|
||||
influence: ostream_joiner实现基于分隔符的join
|
||||
- type: 'feature'
|
||||
item: Log
|
||||
diff: 社区增加新特性
|
||||
influence: 默认sink在每个日志后自动flush
|
||||
- type: 'feature'
|
||||
item: Math
|
||||
diff: 社区增加新特性
|
||||
influence: 增加Cubic Hermite Interpolation、Modified Akima Interpolation、PCHIP Interpolation、Quintic Hermite Interpolation,数值分布增加熵,增加面积计算的几种简单情况。
|
||||
- type: 'feature'
|
||||
item: Mp11
|
||||
diff: 社区增加新特性
|
||||
influence: 增加mp_unique_if、mp_flatten、mp_rotate_left、mp_rotate_right、mp_compose、mp_power_set、mp_partial_sum、mp_iterate
|
||||
- type: 'feature'
|
||||
item: Test
|
||||
diff: 社区增加新特性
|
||||
influence: BOOST_TEST增加tolerance indication, user message and collection comparison modifier
|
||||
- type: 'feature'
|
||||
item: ThrowException
|
||||
diff: 社区增加新特性
|
||||
influence: throw_exception增加boost::source_location类型的重载
|
||||
- type: 'feature'
|
||||
item: Variant2
|
||||
diff: 社区增加新特性
|
||||
influence: 支持std::hash与boost::hash
|
||||
- type: 'feature'
|
||||
item: Atomic
|
||||
diff: 社区删除特性
|
||||
influence: boost/atomic/atomic.hpp不再包含boost/atomic/atomic_flag.hpp与boost/atomic/fences.hpp(涉及到的代码需改为包含boost/atomic.hpp),删除BOOST_ATOMIC_DETAIL_HIGHLIGHT_OP_AND_TEST宏(需使用*_and_test替代),atomic<T>现在考虑T的对齐要求
|
||||
- type: 'ABI'
|
||||
item: data_time
|
||||
diff: data_time全部内联,可以不链接库
|
||||
influence: 无影响,社区保留了库以保持编译兼容。
|
||||
- type: 'ABI'
|
||||
item: IO
|
||||
diff: 调整ostream_string至IO库,并更名为ostream_put
|
||||
influence: 用到此类的代码需要修改类名与库名
|
||||
- type: 'ABI'
|
||||
item: Utility
|
||||
diff: 调整ostream_string至IO库,并更名为ostream_put
|
||||
influence: 用到此类的代码需要修改类名与库名
|
||||
remark: '新增库或类,用户可以根据需要选择使用,对现有代码无影响;使用了Utility库的ostream_string、Atomic库的boost/atomic/atomic.hpp以及BOOST_ATOMIC_DETAIL_HIGHLIGHT_OP_AND_TEST宏的用户需要适配代码;'
|
||||
@ -1,25 +0,0 @@
|
||||
From f58f3df2bf54fd820bd2c043e5000a7c90144804 Mon Sep 17 00:00:00 2001
|
||||
From: Liu Zixian <liuzixian4@huawei.com>
|
||||
Date: Thu, 15 Dec 2022 21:31:43 -0500
|
||||
Subject: [PATCH] Don't run performance test in CI
|
||||
|
||||
---
|
||||
libs/graph/test/Jamfile.v2 | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libs/graph/test/Jamfile.v2 b/libs/graph/test/Jamfile.v2
|
||||
index a0c15ca7b..c882916a7 100644
|
||||
--- a/libs/graph/test/Jamfile.v2
|
||||
+++ b/libs/graph/test/Jamfile.v2
|
||||
@@ -47,7 +47,10 @@ alias graph_test_regular :
|
||||
[ run undirected_dfs.cpp ]
|
||||
[ compile dfs_cc.cpp ]
|
||||
[ compile dijkstra_cc.cpp ]
|
||||
- [ run dijkstra_heap_performance.cpp /boost/timer//boost_timer : 10000 ]
|
||||
+
|
||||
+ # Performance benchmark
|
||||
+ #[ run dijkstra_heap_performance.cpp /boost/timer//boost_timer : 10000 ]
|
||||
+
|
||||
[ run dijkstra_no_color_map_compare.cpp : 10000 ]
|
||||
[ run disjoint_set_test.cpp ]
|
||||
[ run dominator_tree_test.cpp ]
|
||||
@ -1,27 +0,0 @@
|
||||
From 50973dc10ea16931245ea61a00b2ce9041acc5ba Mon Sep 17 00:00:00 2001
|
||||
From: Stephan Bergmann <sbergman@redhat.com>
|
||||
Date: Wed, 4 Jan 2023 17:33:31 +0100
|
||||
Subject: [PATCH] Avoid boost::phoenix::placeholders::uarg1..10 ODR violations
|
||||
|
||||
Those variables, defined in an include file, had external linkage, causing ODR
|
||||
violations. Make them const to implicitly give them internal linkage.
|
||||
---
|
||||
boost/phoenix/stl/tuple.hpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/boost/phoenix/stl/tuple.hpp b/boost/phoenix/stl/tuple.hpp
|
||||
index a83014a..7f61a40 100644
|
||||
--- a/boost/phoenix/stl/tuple.hpp
|
||||
+++ b/boost/phoenix/stl/tuple.hpp
|
||||
@@ -110,7 +110,7 @@ namespace boost { namespace phoenix {
|
||||
namespace placeholders {
|
||||
#define BOOST_PP_LOCAL_LIMITS (1, BOOST_PHOENIX_ARG_LIMIT)
|
||||
#define BOOST_PP_LOCAL_MACRO(N) \
|
||||
- auto uarg##N = \
|
||||
+ auto const uarg##N = \
|
||||
boost::phoenix::get_<(N)-1>(boost::phoenix::placeholders::arg1);
|
||||
#include BOOST_PP_LOCAL_ITERATE()
|
||||
}
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@ -1,30 +0,0 @@
|
||||
From 4239d93dad32a11e4c3829050f8070d456266133 Mon Sep 17 00:00:00 2001
|
||||
From: jzmaddock <john@johnmaddock.co.uk>
|
||||
Date: Wed, 1 Jun 2022 19:35:36 +0100
|
||||
Subject: [PATCH] Update multiprecision_float_test.cpp to not overflow type
|
||||
double. Previously the max value for uint1024_t could just squeeze into a
|
||||
double because truncation occurred during the conversion, now that cpp_int
|
||||
performs correctly rounded conversions, overflow occurs, and the computation
|
||||
fails. Changed the problem distribution to use a multiprecision weight type,
|
||||
rather than double.
|
||||
|
||||
---
|
||||
libs/random/test/multiprecision_float_test.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libs/random/test/multiprecision_float_test.cpp b/libs/random/test/multiprecision_float_test.cpp
|
||||
index bc2a936..2b53483 100644
|
||||
--- a/libs/random/test/multiprecision_float_test.cpp
|
||||
+++ b/libs/random/test/multiprecision_float_test.cpp
|
||||
@@ -77,7 +77,7 @@ typedef boost::mpl::list <
|
||||
boost::random::lognormal_distribution<big_float>,
|
||||
boost::random::normal_distribution<big_float>,
|
||||
#ifndef BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
|
||||
- boost::random::piecewise_constant_distribution<big_float>,
|
||||
+ boost::random::piecewise_constant_distribution<big_float, big_float>,
|
||||
boost::random::piecewise_linear_distribution<big_float>,
|
||||
#endif
|
||||
boost::random::student_t_distribution<big_float>,
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -1,34 +0,0 @@
|
||||
From 7561690135c67ecf88c2133bad7680ebd2665c36 Mon Sep 17 00:00:00 2001
|
||||
From: jzmaddock <john@johnmaddock.co.uk>
|
||||
Date: Wed, 1 Jun 2022 19:32:55 +0100
|
||||
Subject: [PATCH] Update multiprecision_int_test.cpp to not accidentality
|
||||
overflow type double. Multiprecision now performs correct rounding when
|
||||
converting to double - previously the max value for uint1024_t would just fit
|
||||
in a double if it was truncated. But now that it's correctly rounded it
|
||||
overflows and breaks the calculation.
|
||||
|
||||
---
|
||||
libs/random/test/multiprecision_int_test.cpp | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/libs/random/test/multiprecision_int_test.cpp b/libs/random/test/multiprecision_int_test.cpp
|
||||
index 41ec229..a861cca 100644
|
||||
--- a/libs/random/test/multiprecision_int_test.cpp
|
||||
+++ b/libs/random/test/multiprecision_int_test.cpp
|
||||
@@ -215,8 +215,11 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(discrete_distributions, distribution_type, other_d
|
||||
distribution_type d2;
|
||||
ss >> d2;
|
||||
BOOST_CHECK(d == d2);
|
||||
-
|
||||
- boost::random::independent_bits_engine<boost::random::mt19937, std::numeric_limits<boost::multiprecision::uint1024_t>::digits, boost::multiprecision::uint1024_t > big_random;
|
||||
+ //
|
||||
+ // The number of digits in the independent_bits_engine must be low enough that we don't overflow
|
||||
+ // when converting to a double (see other_distributions declared above).
|
||||
+ //
|
||||
+ boost::random::independent_bits_engine<boost::random::mt19937, std::numeric_limits<boost::multiprecision::uint1024_t>::digits - 2, boost::multiprecision::uint1024_t > big_random;
|
||||
for(unsigned i = 0; i < 200; ++i)
|
||||
{
|
||||
result_type r = d(big_random);
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -1,37 +0,0 @@
|
||||
From c3ada7a1b2b54f4b27585f72308a76984f8489b4 Mon Sep 17 00:00:00 2001
|
||||
From: jzmaddock <john@johnmaddock.co.uk>
|
||||
Date: Tue, 16 Mar 2021 10:47:16 +0000
|
||||
Subject: [PATCH] Add missing #includes.
|
||||
|
||||
---
|
||||
test/multiprecision_float_test.cpp | 1 +
|
||||
test/multiprecision_int_test.cpp | 1 +
|
||||
2 files changed, 2 insertions(+)
|
||||
|
||||
diff --git a/libs/random/test/multiprecision_float_test.cpp b/libs/random/test/multiprecision_float_test.cpp
|
||||
index 904c59d..bc2a936 100644
|
||||
--- a/libs/random/test/multiprecision_float_test.cpp
|
||||
+++ b/libs/random/test/multiprecision_float_test.cpp
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <boost/multiprecision/debug_adaptor.hpp>
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
#include <boost/random.hpp>
|
||||
+#include <boost/mpl/list.hpp>
|
||||
#include <sstream>
|
||||
|
||||
|
||||
diff --git a/libs/random/test/multiprecision_int_test.cpp b/libs/random/test/multiprecision_int_test.cpp
|
||||
index 577e52a..41ec229 100644
|
||||
--- a/libs/random/test/multiprecision_int_test.cpp
|
||||
+++ b/libs/random/test/multiprecision_int_test.cpp
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <boost/random/uniform_int.hpp>
|
||||
#include <boost/random/uniform_smallint.hpp>
|
||||
#include <boost/random/discrete_distribution.hpp>
|
||||
+#include <boost/mpl/list.hpp>
|
||||
#include <sstream>
|
||||
|
||||
typedef boost::mpl::list <
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -1,31 +0,0 @@
|
||||
Index: boost_1_80_0/tools/boost_install/boost-install.jam
|
||||
===================================================================
|
||||
--- boost_1_80_0.orig/tools/boost_install/boost-install.jam
|
||||
+++ boost_1_80_0/tools/boost_install/boost-install.jam
|
||||
@@ -753,25 +753,6 @@ rule generate-cmake-config- ( target : s
|
||||
"get_filename_component(_BOOST_CMAKEDIR \"${CMAKE_CURRENT_LIST_DIR}/../\" REALPATH)"
|
||||
: true ;
|
||||
|
||||
- if [ path.is-rooted $(cmakedir) ]
|
||||
- {
|
||||
- local cmakedir-native = [ path-native-fwd $(cmakedir) ] ;
|
||||
-
|
||||
- print.text
|
||||
-
|
||||
- ""
|
||||
- "# If the computed and the original directories are symlink-equivalent, use original"
|
||||
- "if(EXISTS \"$(cmakedir-native)\")"
|
||||
- " get_filename_component(_BOOST_CMAKEDIR_ORIGINAL \"$(cmakedir-native)\" REALPATH)"
|
||||
- " if(_BOOST_CMAKEDIR STREQUAL _BOOST_CMAKEDIR_ORIGINAL)"
|
||||
- " set(_BOOST_CMAKEDIR \"$(cmakedir-native)\")"
|
||||
- " endif()"
|
||||
- " unset(_BOOST_CMAKEDIR_ORIGINAL)"
|
||||
- "endif()"
|
||||
- ""
|
||||
- : true ;
|
||||
- }
|
||||
-
|
||||
get-dir "_BOOST_INCLUDEDIR" : $(includedir) ;
|
||||
|
||||
if $(library-type) = INTERFACE
|
||||
|
||||
1591
boost.spec
1591
boost.spec
File diff suppressed because it is too large
Load Diff
@ -1,4 +0,0 @@
|
||||
version_control: github
|
||||
src_repo: boostorg/boost
|
||||
tag_prefix: ^boost-
|
||||
seperator: .
|
||||
Binary file not shown.
@ -1,13 +0,0 @@
|
||||
Index: boost_1_80_0/libs/test/build/Jamfile.v2
|
||||
===================================================================
|
||||
--- boost_1_80_0.orig/libs/test/build/Jamfile.v2
|
||||
+++ boost_1_80_0/libs/test/build/Jamfile.v2
|
||||
@@ -95,7 +95,7 @@ lib boost_test_exec_monitor
|
||||
: # sources
|
||||
$(TEST_EXEC_MON_SOURCES).cpp
|
||||
: # requirements
|
||||
- <link>static
|
||||
+ # <link>static
|
||||
: # default build
|
||||
: # usage-requirements
|
||||
<link>shared:<define>BOOST_TEST_DYN_LINK=1
|
||||
21
libboost_thread.so
Normal file
21
libboost_thread.so
Normal file
@ -0,0 +1,21 @@
|
||||
changequote(`[', `]')dnl
|
||||
/* GNU ld script
|
||||
|
||||
Boost.Thread header files pull in enough of Boost.System that
|
||||
symbols from the latter library are referenced by a compiled object
|
||||
that includes Boost.Thread headers. libboost_system-mt.so is among
|
||||
libboost_thread-mt.so's DT_NEEDED, but program linker requires that
|
||||
missing symbols are satisfied by direct dependency, not by a
|
||||
transitive one. Hence this linker script, which brings in the
|
||||
Boost.System DSO. */
|
||||
|
||||
INPUT(libboost_thread.so.VERSION)
|
||||
INPUT(libboost_system.so.VERSION)
|
||||
ifdef([HAS_ATOMIC_FLAG_LOCKFREE],[],
|
||||
[
|
||||
/* If the given architecture doesn't have lock-free implementation of
|
||||
boost::atomic_flag, the dependency on Boost.Atomic may leak from
|
||||
the header files to client binaries. */
|
||||
|
||||
INPUT(libboost_atomic.so.VERSION)
|
||||
])dnl
|
||||
33
regex-fix-dead-loop-in-parse_repeat.patch
Normal file
33
regex-fix-dead-loop-in-parse_repeat.patch
Normal file
@ -0,0 +1,33 @@
|
||||
From 91107fe78a290a7d25a042fec09ea89f14f480d9 Mon Sep 17 00:00:00 2001
|
||||
From: xuhuijie <xuhuijie2@huawei.com>
|
||||
Date: Wed, 16 Jun 2021 15:47:22 +0800
|
||||
Subject: [PATCH] regex: fix dead loop in parse_repea
|
||||
There is a bug in parse_repeat(), after deal with comment the
|
||||
contin value will be always true. So we enter a dead loop. To deal with this,
|
||||
we assign contin to false each time we enter the loop.
|
||||
Testcase: boost::regex(std::string("1?+(?#)1"))
|
||||
|
||||
Signed-off-by: Xu Huijie <xuhuijie2@huawei.com>
|
||||
---
|
||||
boost/regex/v4/basic_regex_parser.hpp | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/boost/regex/v4/basic_regex_parser.hpp b/boost/regex/v4/basic_regex_parser.hpp
|
||||
index 6c7065f05..de22f7000 100644
|
||||
--- a/boost/regex/v4/basic_regex_parser.hpp
|
||||
+++ b/boost/regex/v4/basic_regex_parser.hpp
|
||||
@@ -1080,9 +1080,10 @@ bool basic_regex_parser<charT, traits>::parse_repeat(std::size_t low, std::size_
|
||||
// Check for illegal following quantifier, we have to do this here, because
|
||||
// the extra states we insert below circumvents our usual error checking :-(
|
||||
//
|
||||
- bool contin = false;
|
||||
+ bool contin;
|
||||
do
|
||||
{
|
||||
+ contin = false;
|
||||
if ((this->flags() & (regbase::main_option_type | regbase::mod_x | regbase::no_perl_ex)) == regbase::mod_x)
|
||||
{
|
||||
// whitespace skip:
|
||||
--
|
||||
2.23.0
|
||||
|
||||
Loading…
Reference in New Issue
Block a user