Skip to content

Conversation

@carenas
Copy link
Contributor

@carenas carenas commented Aug 17, 2025

pcre2test reports the linksize that was set at build time by all libraries, but at least in the case of the 32-bit library, it is never correct by default, or even relevant as described in pcre2build.

CAVEAT: before this change; eventhough there were three (one per library, if all enabled) identical versions of this function linked with pcre2test, only the first one found was being used and that was "by design", which this changes.

Copy link
Member

@NWilson NWilson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Adding the new EFFECTIVE_LINKSIZE option seems sensible and useful, and the changes to pcre2test are good overall. I just have a few small things that could be tweaked - if you agree.

@carenas carenas force-pushed the linksize branch 3 times, most recently from 5b4c219 to 4354559 Compare August 29, 2025 03:09
PCRE2_CONFIG_LINKSIZE can be used to determne the linksize that the
library was configured to use, but the actual size (and therefore
the maximum size of patterns that can be processed) is not visible.

Add PCRE2_CONFIG_EFFECTIVE_LINKSIZE to gather that value and use it
in `pcre2test` for reporting `linksize`; move the logic to derive
one from the other out of the API documentation and test scripts to
improve maintainability and while at it enable test8 in Windows for
all link sizes.
Copy link
Member

@NWilson NWilson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good! I'll merge once CI completes (just to be sure nothing's broken).

@NWilson NWilson merged commit ec48bfc into PCRE2Project:master Aug 29, 2025
35 checks passed
@carenas
Copy link
Contributor Author

carenas commented Aug 29, 2025

AFAIK the "unused" test that was removed in ec48bfc is there to make sure that the linksize part of the code in pcre2_config is not completely broken, which is a "prerequisite" to trust it later when using it in test8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants