-
Notifications
You must be signed in to change notification settings - Fork 242
pcre2_config: address inconsistency with the linksize reported in non 8-bit libraries #775
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
Conversation
NWilson
left a comment
There was a problem hiding this 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.
5b4c219 to
4354559
Compare
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.
NWilson
left a comment
There was a problem hiding this 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).
|
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. |
pcre2testreports thelinksizethat 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.