Commit Graph

2095 Commits

Author SHA1 Message Date
github-actions[bot]
eb8737f4f7 Sync autogenerated files #noupdate 2025-01-24 11:45:16 +00:00
MatthewVernon
0d579d3568 pcre2grep.1 - fix warning about undefined macro 0 (#673)
Debian's "lintian" picked this up - line 950 in the man page starts
with a ' which is how you start a roff request. You can reproduce the
warning thus:

```
LC_ALL=C.UTF-8 MANROFFSEQ='' MANWIDTH=80 \
man --warnings -E UTF-8 -l -Tutf8 -Z doc/pcre2grep.1 >/dev/null
```

The fix is to add a zero-width space (`\&`) to the start of the
relevant line (indeed `groff_man(7)` suggests exactly this use for \&).

---------

Co-authored-by: Matthew Vernon <matthew@debian.org>
2025-01-24 11:44:47 +00:00
Nicholas Wilson
4f5a2ada2e Update README.md (#672) 2025-01-22 17:45:54 +00:00
Carlo Marcelo Arenas Belón
81dced9442 maint: avoid clang masquerading as gcc in ManyConfigTests (#671)
__GNUC__ is defined by any compiler that claims compliance to GNU
but that doesn't include the cmdline interface, so avoid passing
GCC specific warning flags to clang.
2025-01-14 14:12:26 +00:00
Nicholas Wilson
03c097797a Fix up GCC compiler detection in ManyConfigTests (#670)
Also, add fixes/suppressions for the inevitable warnings that have appeared due to the CI job not running with warnings.
2025-01-13 16:40:52 +00:00
Carlo Marcelo Arenas Belón
95181ffc05 macOS related patches for 10.45 (#668)
* autotools: retire conditional for debug build

likely added by mistake, the functionality works through `--enable-debug`
instead.

* maint: allow selecting compiler for ManyConfigTests

Instead of hardcoding the compiler as `cc`, let a CC environment
variable dictate which compiler to use.

For example, in macOS/arm64 where the GNU compiler is provided by
brew the following will allow using it instead of the system compiler
(which ALSO answers to `gcc` even though is `clang`)

  % CC=gcc-13 maint/ManyConfigTests
2025-01-13 15:42:07 +00:00
Nicholas Wilson
c99e809565 Correction to CI config (#669) 2025-01-13 09:40:36 +00:00
github-actions[bot]
2ec34b9099 Sync autogenerated files 2025-01-12 15:30:09 +00:00
Nicholas Wilson
e02e52804c Update release number to 10.46-DEV #noupdate (#667) 2025-01-12 15:28:37 +00:00
Nicholas Wilson
9ee6583aaf Finish cleanup of six fuzzer files (#665) 2025-01-12 12:53:43 +00:00
Nicholas Wilson
4aa00086eb Try new strategy for auto updates (#664)
I previously added a CI that the documentation was not dirty. This turns out to be too strict: it's onerous to have contributors install the exactly-matching `nroff` setup required to sync the documentation.

Instead, the CI check now commits and pushes the change to the PR (if it's a same-fork PR), and ignores the changes if it's a PR from another fork.

The CI will push the PrepareRelease changes on master, if needed.

Fixes #653
2025-01-12 11:00:30 +00:00
Nicholas Wilson
971de5f444 Add multiarch build jobs (#663)
* S390x is important, because it's basically the only supported big-endian
  architecture I can find anywhere. I used to work on SPARC and PPC-be systems
  a long time ago, but even Debian has dropped those architectures now, so
  it's nice that there's *least one* arch remaining to shake out endian
  assumptions.
* PPC64LE is Big-iron POWER only (this is not the PowerPC arch used in old Apple Macs)
* ARMv7 is a 32-bit Linux build. i386 is mostly gone now, so ARMv7 is all that's left.
* AARCH64 is the only really widely-deployed non-x86 archicture, at least that's likely
  to be running PCRE2.
* RiscV, since it's the Next Big Thing™.
2025-01-11 19:01:56 +00:00
Nicholas Wilson
9a868b0605 Tidy up config.h management (task from README) (#658)
This fortuitously fixes the 16/32-bit 'unity' build.

Also tidy up the ckd_smul macros, for the sake of the Unity build.
2025-01-11 19:01:08 +00:00
Nicholas Wilson
5eb327635c Copy fuzzing data files to a tidier place (#661) 2025-01-11 10:51:37 +00:00
Nicholas Wilson
f724b6117b Declutter one cmake file (#662) 2025-01-11 10:29:49 +00:00
Nicholas Wilson
acb4b56944 Enable and fix additional build warnings (#655)
Part of #651

* Use much stricter windows warnings (`/W3` rather than `/W1`). This requires quite a few fixes for all the sloppy places where we do implicit assignment of 64-bit values to 32-bit storage.
* Use and test CMake build & install on FreeBSD and Solaris
* Add 64 bit Solaris build (`cc -m64`) and fix existing Solaris warnings
* Make compile flags used in CI consistent across platforms. Previously Mac & Linux were building with different warning flags.
* Add `--enable-Werror` to `configure.ac`. This means that you can build with `-Werror` in a clean way. Previously, you had to hackily override the CPPFLAGS when calling `make` since you can't pass `-Werror` as a CFLAG into `./configure` (it messes with compiler feature detection).
2025-01-10 13:33:52 +00:00
Nicholas Wilson
47a09b6372 Add CI for MSYS2 (#660)
Also fix a few minor portability issues.

- The unix "MSYS" environment has an usual (but sane) French locale,
  requiring a test update
- pcre2grep needs a fix to use the WIN32 when both WIN32 and sys/stat.h
  are available

Fixes #127
2025-01-10 07:24:55 +00:00
Nicholas Wilson
d50aa5834a Update all pipelines to Ubuntu-24.04 to validate upcoming change (#657) 2025-01-07 13:56:37 +00:00
Lucas Trzesniewski
35eafc9d20 Fix warning about signed/unsigned mismatch (#649) 2024-12-27 19:30:22 +01:00
Nicholas Wilson
236853194f Update modification dates #noupdate 2024-12-27 00:49:58 +00:00
Nicholas Wilson
64613feb6d Update modified dates #noupdate 2024-12-26 23:50:55 +00:00
Nicholas Wilson
23b4df750b Completely redo the substitute-case-callout work (#638)
Fixes #564

The previous API was not extensible to handle multi-character case rules. It required a fair bit of reworking in order to accommodate this. I had to delay the casing transformations to be done later, by buffering up the string to transform, and then allowing the callback to do an in-place transformation on the entire input to be transformed.
2024-12-26 23:46:21 +00:00
Nicholas Wilson
af03ceaf97 Update ChangeLog and NEWS for 10.45 (#643) 2024-12-26 15:12:15 +00:00
Nicholas Wilson
78857e4c61 Fix UCP-only handling of caseless character classes (#644)
Fixes #526

The handling is rather brittle; but it will do for now. We should always compute the caseless extension of character classes, for cranges and bitset branches; however we can add some delicate and dubious optimisation to avoid doing the caseless extension two times, when converting from a cranges to a bitset.
2024-12-26 14:59:30 +00:00
Zoltan Herczeg
ff375d6241 Fix xclass compilation (#646) 2024-12-26 12:41:08 +01:00
Zoltan Herczeg
c36b2fb4bf Move L& conversion (#645) 2024-12-25 07:42:12 +01:00
Zoltan Herczeg
266325f0aa Improve iterator backtrack handling (#642)
Previous backtracks can be used for escaping iterators.
Don't allocate backtrack data when unnecessary.
2024-12-23 13:35:24 +01:00
Zoltan Herczeg
3b11f3196a Improve non-greedy repeat support (#641) 2024-12-22 07:04:57 +01:00
Nicholas Wilson
3efd1be297 Fix another Codecov typo 2024-12-20 22:09:39 +00:00
Nicholas Wilson
070f561c62 Add maint scripts for checking and updating library version & updated dates (#635)
The workflow shall be:

* When the release number is bumped, all references to that release number need to be bumped immediately. (For example, when the source code moves from 10.45 → 10.46, the man pages must do so as well.)
* When documentation is updated, there's no need to update the "last modified" dates by hand. We can sweep those all up during the release process. Or update them immediately - there's no harm in it; we simply aren't obliged to.
2024-12-20 22:00:32 +00:00
Zoltan Herczeg
e84e6e762b Improve greedy repeat support (#639) 2024-12-20 19:34:45 +01:00
Nicholas Wilson
4d51186dcb Reduce Codecov spam 2024-12-20 14:01:18 +00:00
Nicholas Wilson
4d3eada79b Update soversion passed to libtool for 10.45 (#636)
I believe this is the correct procedure, based on Philip's documentation.

The libpcre2-posix interface is completely unchanged, but the source code has been updated.

The libpcre2-NN interface has been extended in backwards-compatible ways, with new enum values and API functions, so callers compiled and linked against the old version may use the newer as a drop-in replacement, but callers compiled against the 10.45 headers will fail when used against the old version (if they require any newly-added functions).
2024-12-20 13:36:08 +00:00
Zoltan Herczeg
782459c108 Improve possessive repeat support (#632) 2024-12-19 12:53:38 +01:00
Nicholas Wilson
09c07ac7ab Small improvement to combination of substitution callout + overflow (#637)
I reckon that callers are assuming that when you use the PCRE2_SUBSTITUTE_OVERFLOW_LENGTH option, it will calculate the entire memory requirement in one go. Just two calls should be sufficient (rather than needing to loop with a gradually-increasing buffer size).

However, with a substitution callout this is not true. If you call once with PCRE2_SUBSTITUTE_OVERFLOW_LENGTH, the buffer length returned might still not be sufficient for the second call to succeed.

This is because the callout might not be called the first time, but the second time it will be called and can affect control flow, by requiring even more buffer to be used. This occurs even if the callout is completely stateless, idempotent and well-behaved.

This fix ensures that when we skip a callout (due to overflow), we still request enough buffer size for either option that the callout might return.
2024-12-19 10:46:03 +00:00
Nicholas Wilson
f15bdd334d Update all man page dates #noupdate (#634) 2024-12-18 14:12:58 +00:00
Nicholas Wilson
f0819ca7c5 Update references to maintainers in the README (#633) 2024-12-18 13:54:08 +00:00
Nicholas Wilson
5b3edae9d2 Add CI test to ensure installation manifest is correct (#630)
The new CI job ensures that `make distcheck` passes.

It also bundles up the tarball and includes in the GitHub artifacts, along with a GitHub-provided attestation that the tarball is derived from the given build steps.
2024-12-18 12:02:23 +00:00
Nicholas Wilson
413bd8a6ee Add zig build to CI (#622)
It's not ideal, but at least it's being tested. I have added support for pcre2test, so that we can run the unit tests against the library which Zig builds.
2024-12-17 11:10:06 +00:00
Nicholas Wilson
0ed421c00e Add Bazel build to CI (#623)
Add Bazel to CI using Bazelisk from the GitHub test runners.

Fix many things in the Bazel build file... and also add basic testing which executes pcre2test using RunTest.

---------

Co-authored-by: zaucy <zekewarren@gmail.com>
2024-12-16 11:35:31 +00:00
Nicholas Wilson
4a268c9546 Disable assertion code for the purposes of coverage checking (#629) 2024-12-16 11:16:27 +00:00
Zoltan Herczeg
16c44a996b Rework limited range repeats (#628) 2024-12-16 11:41:36 +01:00
Zoltan Herczeg
a2a3a6e6f5 Improve repeat support for plus (#626) 2024-12-14 20:15:04 +01:00
Zoltan Herczeg
50811e22c7 Improve repeat support (#624)
Less generated code duplication in ++ and +? cases.
Especially useful for large classes.
2024-12-14 08:05:15 +01:00
Nicholas Wilson
45506a2071 Update Codecov test binary paths 2024-12-13 16:39:14 +00:00
Nicholas Wilson
b2cfcda318 Add some YAML to reduce Codecov spam (#625) 2024-12-13 12:11:30 +00:00
Nicholas Wilson
ad966b7cd5 Add Codecov.io integration (#621)
This will help us with issue #601

I don't know how good the Codecov.io service is. Let's just give it a go, and see if it helps us at all.
2024-12-12 08:40:19 +00:00
Nicholas Wilson
7a806efd4c Add Solaris and FreeBSD to our CI (#620)
The Solaris build tests using Oracle's Sun-Studio `cc` compiler.

These builds are run inside nested VMs, using a third-party GitHub Action (but on GitHub-hosted hardware).

The builds are run on pushes to master, but not on each change to a PR.
2024-12-12 08:39:41 +00:00
Zoltan Herczeg
b7894fb945 Rework memory management (#619)
Small code improvement, limit checks.
2024-12-11 16:28:10 +01:00
Nicholas Wilson
ac528f2d26 Details on new maintainership (#603)
* Add details on new maintainership
* Remove checked-in autoconf outputs
* Sync & cleanup files with Detrail
* Add CI job for ensuring PrepareRelease is run
* Add Ubuntu-20.04 autoconf runner
* Make CMake installed files match autoconf
* Update acknowledgements
2024-12-11 09:53:59 +00:00