Skip to content
Snippets Groups Projects

Regex: Double the maximal allowed size for a regex (to 2^{16}-1)

Merged Deniz Bahadir requested to merge dbahadir/kwsys:support_larger_regex into master

While writing unit-tests for CMake itself, which output a lot of messages, I realized that I sadly exceed the maximal supported regex-size quite easily.

Looking into CMake's code, I realized that the regex size seems to be (arbitrarily) limited to 2^{15}-1 (= 32767 bytes).
However, a comment next to that line stated that that limit could probably be raised to 2^{16}-1 (= 65535 bytes) without any problems.

That's what I did. And everything seems to work smoothly.

As suggested in the merge-request I originally created for the CMake source (cmake/cmake!5284 (closed)) I am hereby providing the merge-request against the upstream repository.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading