Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
57ccc94
Default empty destructor.
ecatmur Feb 22, 2023
85580fd
Make the library modular usable.
grafikrobot Mar 11, 2024
b86985e
Set a limit on max recursions.
jzmaddock Mar 16, 2024
1d50b15
Correction for standalone mode.
jzmaddock Mar 16, 2024
1a6c4cf
Correct command line
jzmaddock Mar 16, 2024
b99ec17
Allow use of deprecated header for now.
jzmaddock Mar 16, 2024
ae34d3c
Rework format string protection to be non-throwing.
jzmaddock Mar 17, 2024
5ee5453
Add rational as a manual dependency.
jzmaddock Mar 18, 2024
2609fcc
Try again with CI.
jzmaddock Mar 19, 2024
1e0938c
Try again with CI.
jzmaddock Mar 19, 2024
10df075
Tidy up CI.
jzmaddock Mar 22, 2024
b8e5806
Merge pull request #204 from boostorg/recusion_stopper
jzmaddock Mar 23, 2024
6579375
Remove outdated C++03 code.
jzmaddock Mar 23, 2024
571fbaf
Sync from upstream.
grafikrobot Mar 23, 2024
6796ffa
Expunge C++03'isms from the docs.
jzmaddock Mar 23, 2024
f4428de
Update history and docs.
jzmaddock Mar 24, 2024
4ca037c
Merge pull request #205 from boostorg/remove_03
jzmaddock Mar 24, 2024
ecd5c20
Remove throw() specification.
jzmaddock Mar 24, 2024
6b78d0a
Merge pull request #191 from ecatmur/deprecated-copy
jzmaddock Mar 24, 2024
b130106
Merge pull request #206 from boostorg/remove_nothrow
jzmaddock Mar 24, 2024
6efa868
Update concepts to check for accidental char_traits usage.
jzmaddock Mar 25, 2024
260982e
Merge pull request #207 from boostorg/update_concepts
jzmaddock Mar 25, 2024
c82a797
Suppress conversion warnings in match_results.
jzmaddock Mar 25, 2024
3e32c14
Merge pull request #208 from boostorg/issue197
jzmaddock Mar 25, 2024
cb55913
Remove obsolete Jamfile option.
jzmaddock Mar 25, 2024
1dcd331
Switch to library requirements instead of source. As source puts extr…
grafikrobot Mar 30, 2024
e5ac768
Sync from upstream.
grafikrobot Apr 10, 2024
8dc1fd4
Update build dependencies and fix test compile error from depending o…
grafikrobot Apr 10, 2024
72652f7
Add missing file.
grafikrobot Apr 10, 2024
8e2a51e
Add missing lib reference.
grafikrobot Apr 26, 2024
801d83f
Add missing NO_LIB usage requirements.
grafikrobot Apr 29, 2024
e469b8a
Fix extra arg for lib declaration.
grafikrobot Apr 29, 2024
126875c
Update library dependencies.
grafikrobot Apr 30, 2024
f9c3c8c
Add requires-b2 check to top-level build file.
grafikrobot May 5, 2024
028935b
Bump B2 require to 5.2
grafikrobot Jun 14, 2024
e5a7bbd
Change all <source> references to <library>.
grafikrobot Jul 21, 2024
fa2d2e1
Update copyright dates.
grafikrobot Jul 21, 2024
fdacaf7
Move inter-lib dependencies to a project variable and into the build …
grafikrobot Jul 24, 2024
e3840cf
Split b2 dependencies into public and private.
grafikrobot Jul 26, 2024
cd92ca1
Update build deps.
grafikrobot Aug 8, 2024
1144c1d
Add VERBATIM to add_custom_target
grafikrobot Aug 9, 2024
d4e7ac7
Performance improvement
BrianWeed Aug 14, 2024
dca0bdc
Merge pull request #215 from grafikrobot/modular
jzmaddock Aug 19, 2024
d3697ab
Fix deprecated-declarations error on clang-win
k3DW Aug 23, 2024
bd821cd
Merge pull request #216 from BrianWeed/patch-1
jzmaddock Aug 24, 2024
5243906
Merge pull request #218 from k3DW/deprecated-declarations
jzmaddock Aug 24, 2024
65726f3
Define _CRT_SECURE_NO_WARNINGS instead of using wcscpy_s. Fixes #219.
pdimov Sep 2, 2024
cff442b
Add VERBATIM to the remaining add_custom_target as well
pdimov Sep 2, 2024
ccfc765
Move <warnings>all from requirements to default-build. Fixes #223.
pdimov Sep 2, 2024
e61e5e1
Merge pull request #222 from boostorg/pr/add-verbatim
jzmaddock Sep 3, 2024
49c4e8c
Merge pull request #221 from boostorg/pr/fix-clang-cl-2
jzmaddock Sep 3, 2024
bb9f2b1
Merge pull request #224 from boostorg/pr/default-build-warnings
jzmaddock Sep 3, 2024
bd0e76f
Correct example/Jamfile.v2 so that grep gets valid command line argum…
jzmaddock Nov 2, 2024
9a8d2b1
Tentative fix for #227. (#230)
jzmaddock Nov 6, 2024
f0afa5d
#include cleanup (#231)
cmazakas Nov 23, 2024
0cbaa4e
fix #232 (#234)
cmazakas Dec 5, 2024
57ca082
Make backstep calculation non-recursive.
jzmaddock Dec 16, 2024
f039773
Merge pull request #237 from boostorg/backstep_recursion
jzmaddock Dec 18, 2024
7af2aad
Add module support and tests. (#174)
jzmaddock Dec 18, 2024
85ffdd9
update ci to include ubsan and asan
cmazakas Dec 19, 2024
a40c96d
fix negation operator creating an enum with an invalid value
cmazakas Dec 9, 2024
4f4c729
use manual pointer arithmetic to avoid invalid pointer cast
cmazakas Dec 9, 2024
093e135
fix overflow bug when attempting to access match results
cmazakas Dec 20, 2024
31f98f2
Merge pull request #239 from cmazakas/feature/overflow-fix
jzmaddock Dec 21, 2024
3593750
Merge pull request #238 from cmazakas/feature/sanitizers
jzmaddock Dec 31, 2024
9a40804
Merge branch 'develop' into master-merge-2025-01-27
jzmaddock Jan 27, 2025
0b64ece
Merge pull request #242 from boostorg/master-merge-2025-01-27
jzmaddock Jan 28, 2025
187be72
fix cve issue 42506269
cmazakas Feb 14, 2025
34b1c2f
Merge pull request #245 from cmazakas/cve-42506269
jzmaddock Feb 28, 2025
f0ae2d8
fix integer overflow when parsing Perl-extended named backrefs
cmazakas Feb 27, 2025
f851a08
Merge pull request #246 from cmazakas/cve-42512790
jzmaddock Mar 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
123 changes: 106 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,22 @@ on:
branches:
- master
- develop
- feature/**
- cve-*
pull_request:
release:
types: [published, created, edited]

env:
UBSAN_OPTIONS: print_stacktrace=1

jobs:
ubuntu-focal:
runs-on: ubuntu-20.04
ubuntu-jammy:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
compiler: [ g++-9, g++-10, clang++-9, clang++-10 ]
compiler: [ g++-11, g++-12, g++-13 ]
standard: [ c++11, c++14, c++17, c++2a ]
steps:
- uses: actions/checkout@v2
Expand All @@ -34,7 +40,7 @@ jobs:
- name: Add repository
run: sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
- name: Install packages
run: sudo apt install g++-9 g++-10 clang-9 clang-10 libicu-dev
run: sudo apt install g++-11 g++-12 g++-13
- name: Checkout main boost
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
- name: Update tools/boostdep
Expand All @@ -55,14 +61,11 @@ jobs:
- name: Generate user config
run: 'echo "using $TOOLSET : : ${{ matrix.compiler }} : <cxxflags>-std=${{ matrix.standard }} ;" > ~/user-config.jam'
working-directory: ../boost-root
- name: Config info install
run: ../../../b2 config_info_travis_install toolset=$TOOLSET
working-directory: ../boost-root/libs/config/test
- name: Config info
run: ./config_info_travis
run: ../../../b2 print_config_info toolset=$TOOLSET
working-directory: ../boost-root/libs/config/test
- name: Test
run: ../../../b2 toolset=$TOOLSET
run: ../../../b2 toolset=$TOOLSET variant=debug,release ${{ startsWith(matrix.compiler, 'g++-13') && 'address-sanitizer=norecover undefined-sanitizer=norecover' || '' }}
working-directory: ../boost-root/libs/regex/test
ubuntu-jammy-standalone:
runs-on: ubuntu-22.04
Expand All @@ -89,12 +92,12 @@ jobs:
- name: Test
run: ${{ matrix.compiler }} -std=${{ matrix.standard }} -I../../include *.cpp ../../src/*.cpp -o regress && ./regress
working-directory: ./test/regress
ubuntu-bionic:
runs-on: ubuntu-18.04
ubuntu-jammy-clang:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
compiler: [ g++-7, g++-8, clang++-7, clang++-8 ]
compiler: [ clang++-15 ]
standard: [ c++11, c++14, c++17 ]
steps:
- uses: actions/checkout@v2
Expand All @@ -110,7 +113,7 @@ jobs:
- name: Add repository
run: sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
- name: Install packages
run: sudo apt install g++-7 g++-8 clang-7 clang-8 libicu-dev
run: sudo apt install clang-15
- name: Checkout main boost
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
- name: Update tools/boostdep
Expand All @@ -131,15 +134,95 @@ jobs:
- name: Generate user config
run: 'echo "using $TOOLSET : : ${{ matrix.compiler }} : <cxxflags>-std=${{ matrix.standard }} ;" > ~/user-config.jam'
working-directory: ../boost-root
- name: Config info install
run: ../../../b2 config_info_travis_install toolset=$TOOLSET
working-directory: ../boost-root/libs/config/test
- name: Config info
run: ./config_info_travis
run: ../../../b2 print_config_info toolset=$TOOLSET
working-directory: ../boost-root/libs/config/test
- name: Test
run: ../../../b2 toolset=$TOOLSET define=CI_SUPPRESS_KNOWN_ISSUES define=SLOW_COMPILER
working-directory: ../boost-root/libs/regex/test
ubuntu-jammy-clang-18-modules:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- uses: mstachniuk/ci-skip@v1
with:
commit-filter: '[skip ci];[ci skip];[CI SKIP];[SKIP CI];***CI SKIP***;***SKIP CI***;[windows];[Windows];[WINDOWS];[apple];[Apple];[APPLE]'
commit-filter-separator: ';'
fail-fast: true
- name: Grab install script
run: wget https://apt.llvm.org/llvm.sh && chmod u+x llvm.sh
- name: Install clang 18 packages
run: sudo ./llvm.sh 18 && clang++-18 --version
- name: Checkout main boost
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
- name: Update tools/boostdep
run: git submodule update --init tools/boostdep
working-directory: ../boost-root
- name: Copy files
run: cp -r $GITHUB_WORKSPACE/* libs/regex
working-directory: ../boost-root
- name: Install deps
run: python tools/boostdep/depinst/depinst.py -I example -g "--jobs 3" regex
working-directory: ../boost-root
- name: Bootstrap
run: ./bootstrap.sh
working-directory: ../boost-root
- name: Generate headers
run: ./b2 headers
working-directory: ../boost-root
- name: Test
run: CXX=clang++-18 LIBRARIES="-licuuc -licudata -licui18n" ./test_clang.sh
working-directory: ../boost-root/libs/regex/test/module
ubuntu-noble-clang:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
compiler: [ clang++-16, clang++-17, clang++-18 ]
standard: [ c++11, c++14, c++17, c++20 ]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- uses: mstachniuk/ci-skip@v1
with:
commit-filter: '[skip ci];[ci skip];[CI SKIP];[SKIP CI];***CI SKIP***;***SKIP CI***;[windows];[Windows];[WINDOWS];[apple];[Apple];[APPLE]'
commit-filter-separator: ';'
fail-fast: true
- name: Set TOOLSET
run: echo ${{ matrix.compiler }} | awk '/^g/ { print "TOOLSET=gcc" } /^clang/ { print "TOOLSET=clang" }' >> $GITHUB_ENV
- name: Add repository
run: sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
- name: Install packages
run: sudo apt install clang-16 clang-17 clang-18
- name: Checkout main boost
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
- name: Update tools/boostdep
run: git submodule update --init tools/boostdep
working-directory: ../boost-root
- name: Copy files
run: cp -r $GITHUB_WORKSPACE/* libs/regex
working-directory: ../boost-root
- name: Install deps
run: python tools/boostdep/depinst/depinst.py -I example -g "--jobs 3" regex
working-directory: ../boost-root
- name: Bootstrap
run: ./bootstrap.sh
working-directory: ../boost-root
- name: Generate headers
run: ./b2 headers
working-directory: ../boost-root
- name: Generate user config
run: 'echo "using $TOOLSET : : ${{ matrix.compiler }} : <cxxflags>-std=${{ matrix.standard }} ;" > ~/user-config.jam'
working-directory: ../boost-root
- name: Config info
run: ../../../b2 print_config_info toolset=$TOOLSET
working-directory: ../boost-root/libs/config/test
- name: Test
run: ../../../b2 toolset=$TOOLSET define=CI_SUPPRESS_KNOWN_ISSUES define=SLOW_COMPILER variant=debug,release ${{ startsWith(matrix.compiler, 'clang++-18') && 'address-sanitizer=norecover undefined-sanitizer=norecover' || '' }}
working-directory: ../boost-root/libs/regex/test
macos:
runs-on: macos-latest
strategy:
Expand Down Expand Up @@ -344,6 +427,9 @@ jobs:
commit-filter: '[skip ci];[ci skip];[CI SKIP];[SKIP CI];***CI SKIP***;***SKIP CI***;[apple];[Apple];[APPLE];[linux];[Linux];[LINUX]'
commit-filter-separator: ';'
fail-fast: true
- uses: TheMrMilchmann/setup-msvc-dev@v3
with:
arch: x64
- name: Checkout main boost
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
- name: Update tools/boostdep
Expand All @@ -370,6 +456,9 @@ jobs:
- name: Test
run: ..\..\..\b2 --hash %ARGS%
working-directory: ../boost-root/libs/regex/test
- name: Module Test
run: msvc_test.bat
working-directory: ../boost-root/libs/regex/test/module
ubuntu-cmake-install:
runs-on: ubuntu-20.04
strategy:
Expand Down
30 changes: 30 additions & 0 deletions build.jam
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Copyright René Ferdinand Rivera Morell 2023-2024
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)

require-b2 5.2 ;

constant boost_dependencies :
/boost/assert//boost_assert
/boost/concept_check//boost_concept_check
/boost/config//boost_config
/boost/predef//boost_predef
/boost/static_assert//boost_static_assert
/boost/throw_exception//boost_throw_exception
/boost/type_traits//boost_type_traits ;

project /boost/regex
: common-requirements
<include>include
;

explicit
[ alias boost_regex : build//boost_regex ]
[ alias all : boost_regex example test ]
;

call-if : boost-library regex
: install boost_regex
;

56 changes: 27 additions & 29 deletions build/Jamfile.v2
Original file line number Diff line number Diff line change
@@ -1,29 +1,34 @@
# copyright John Maddock 2003
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt.

import modules ;
import testing ;
import errors ;

project : requirements
# default to all warnings on:
<warnings>all
constant boost_dependencies_private :
/boost/core//boost_core
;

project
: default-build <warnings>all
: common-requirements <library>$(boost_dependencies)
: requirements <library>$(boost_dependencies_private)
;

local disable-icu = [ MATCH (--disable-icu) : [ modules.peek : ARGV ] ] ;

rule path_options ( properties * )
{
local result ;
if <address-model>64 in $(properties) && <toolset>msvc in $(properties)
if <address-model>64 in $(properties) && <toolset>msvc in $(properties)
{
result = <search>$(ICU_PATH)/bin64 <search>$(ICU_PATH)/lib64 ;
result = <search>$(ICU_PATH)/bin64 <search>$(ICU_PATH)/lib64 ;
}
else
{
result = <search>$(ICU_PATH)/bin <search>$(ICU_PATH)/lib ;
result = <search>$(ICU_PATH)/bin <search>$(ICU_PATH)/lib ;
}
return $(result) ;
}
Expand All @@ -34,24 +39,24 @@ rule path_options ( properties * )
if ! $(disable-icu)
{
if [ modules.peek : ICU_LINK ]
{
{
errors.user-error : "The ICU_LINK option is no longer supported by the Boost.Regex build - please refer to the documentation for equivalent options" ;
}

if [ modules.peek : ICU_PATH ]
{
{
ICU_PATH = [ modules.peek : ICU_PATH ] ;
}
if [ modules.peek : ICU_ICUUC_NAME ]
{
{
ICU_ICUUC_NAME = [ modules.peek : ICU_ICUUC_NAME ] ;
}
if [ modules.peek : ICU_ICUDT_NAME ]
{
{
ICU_ICUDT_NAME = [ modules.peek : ICU_ICUDT_NAME ] ;
}
if [ modules.peek : ICU_ICUIN_NAME ]
{
{
ICU_ICUIN_NAME = [ modules.peek : ICU_ICUIN_NAME ] ;
}

Expand Down Expand Up @@ -102,16 +107,16 @@ if ! $(disable-icu)
lib icuin : : <name>this_is_an_invalid_library_name ;
}

ICU_OPTS =
<include>$(ICU_PATH)/include
ICU_OPTS =
<include>$(ICU_PATH)/include
<runtime-link>shared:<library>icuuc/<link>shared
<runtime-link>shared:<library>icudt/<link>shared
<runtime-link>shared:<library>icuin/<link>shared
<runtime-link>static:<library>icuuc
<runtime-link>static:<library>icudt
<runtime-link>static:<library>icuin
<target-os>windows,<toolset>clang:<linkflags>"advapi32.lib"
<define>BOOST_HAS_ICU=1
<define>BOOST_HAS_ICU=1
<runtime-link>static:<define>U_STATIC_IMPLEMENTATION=1
;

Expand Down Expand Up @@ -142,24 +147,17 @@ if ! $(disable-icu)
exe has_icu : has_icu_test.cpp : $(ICU_OPTS) ;
explicit has_icu ;

obj is_legacy_03 : is_legacy_03.cpp ;
explicit is_legacy_03 ;

alias icu_options : : : : [ check-target-builds has_icu : $(ICU_OPTS) : ] ;

SOURCES =
SOURCES =
posix_api.cpp
regex.cpp
regex_debug.cpp
static_mutex.cpp
wide_posix_api.cpp
;

lib boost_regex : ../src/$(SOURCES) icu_options
:
<link>shared:<define>BOOST_REGEX_DYN_LINK=1
<toolset>gcc-cygwin:<link>static
:
<link>shared:<define>BOOST_REGEX_DYN_LINK=1
<toolset>gcc-cygwin:<link>static
: :
<define>BOOST_REGEX_NO_LIB=1
;

boost-install boost_regex ;

16 changes: 0 additions & 16 deletions build/is_legacy_03.cpp

This file was deleted.

3 changes: 1 addition & 2 deletions doc/headers.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@

There are two main headers used by this library: `<boost/regex.hpp>`
provides full access to the main template library, while `<boost/cregex.hpp>`
provides access to the (deprecated) high level class RegEx, and the
POSIX API functions.
provides access to the POSIX API functions.

There is also a header containing only forward declarations
`<boost/regex_fwd.hpp>` for use when an interface is dependent upon
Expand Down
5 changes: 5 additions & 0 deletions doc/history.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ Currently open issues can be viewed [@https://github.com/boostorg/regex/issues?q

All issues including closed ones can be viewed [@https://github.com/boostorg/regex/issues?q=is%3Aissue+is%3Aclosed here].

[h4 Boost.Regex-8.0.0 (Boost-1.86.0)]

* BREAKING CHANGE: deprecated C++03 support has now been removed.
* Fixed some low-impact security issues: [@https://github.com/boostorg/regex/pull/204 204].

[h4 Boost.Regex-7.0.1 (boost-1.79.0)]

* Minor fix for setting building with -DBOOST_REGEX_MAX_CACHE_BLOCKS=0 and `<atomic>` present.
Expand Down
Loading
Loading