Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reimplement PCRE2_UNREACHABLE() assertions with a slightly safer approach #490

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Sep 30, 2024

  1. reimplement asserts with a safer approach

    The original asserts weren't very useful in debug mode as they
    were lacking information on where they were being triggered and
    were also unreliable and dangerous as they could result in
    important code being removed and trigger crashes (even in non
    debug mode).
    
    Instead of implementing one generic assert for both modes, build
    a more useful one for each one, so PCRE2_UNREACHABLE() could be
    also used in non debug builds to help with optimization.
    
    Reinstate all original assertions to use the new versions, which
    will have the sideeffect of fixing indentation issues introduced
    in the original, and include additional asserts that were provided
    as the original ones were being audited for safety. Note that during
    such audit the use of the original asserts might had been refactored
    so it also includes all those relevant code changes.
    
    While at it, update cmake and CI to help with testing as well as
    other documentation.
    
    Co-authored-by: Alex Dowad <alexinbeijing@gmail.com>
    carenas and alexdowad committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    43764b6 View commit details
    Browse the repository at this point in the history