https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89927

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Wakely <r...@gcc.gnu.org>:

https://gcc.gnu.org/g:6b6788f8c2748060d922cc22173ff7f8500917e9

commit r12-4326-g6b6788f8c2748060d922cc22173ff7f8500917e9
Author: Jonathan Wakely <jwak...@redhat.com>
Date:   Mon Oct 11 12:08:59 2021 +0100

    libstdc++: Add valid range assertions to std::basic_regex [PR89927]

    This adds some debug assertions to basic_regex. They don't actually
    diagnose the error in the PR yet, but I have another patch to make them
    more effective.

    Also change the __glibcxx_assert(false) consistency checks to include a
    string literal that tells the user a bit more about why the process
    aborted. We could consider adding a __glibcxx_bug or
    __glibcxx_internal_error macro for this purpose, but ideally we'll never
    hit such bugs anyway so it shouldn't be needed.

    libstdc++-v3/ChangeLog:

            PR libstdc++/89927
            * include/bits/regex.h (basic_regex(const _Ch_type*, size_t)):
            Add __glibcxx_requires_string_len assertion.
            (basic_regex::assign(InputIterator, InputIterator)): Add
            __glibcxx_requires_valid_range assertion.
            * include/bits/regex_scanner.tcc (_Scanner::_M_advance())
            (_Scanner::_M_scan_normal()): Use string literal in assertions.

Reply via email to