Skip to content

Conversation

@carenas
Copy link
Contributor

@carenas carenas commented Aug 31, 2025

Mainly fix a simple build failure because of the removal of the "config.h" include, but also some "fixes" for a "-Weverything" build and other tidying up of the code that made sense.

Comment on lines 85 to 86
for (i = 0; i < PRIV(utf8_table1_size); i++)
if ((int)cvalue <= PRIV(utf8_table1)[i]) break;
Copy link
Member

Choose a reason for hiding this comment

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

Wow, this writes out a rather weird & ill-formed sequence if you pass in cvalue = 0xffff_ffff. However that value shouldn't be passed in, and the code doesn't do any bad loops or out-of-bounds access. So, I guess it's OK.

Copy link
Contributor Author

@carenas carenas Aug 31, 2025

Choose a reason for hiding this comment

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

correct, I almost threw it a PCRE2_ASSERT there as that function shouldn't be getting anything over 0x10ffff anyway AFAIK, at least when called from the library.

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, thanks!

@NWilson
Copy link
Member

NWilson commented Aug 31, 2025

Ah - the CI is failing. It looks like you need to find all the other uses of utf8_table1_size (now that you've made it unsigned) and convert them also to use it in an unsigned context.

Since 9a868b0 (Tidy up config.h management (task from README) (PCRE2Project#658),
2025-01-11), it fails to build with an "#error" because "config.h" is
no longer included directly.

Move the check and change some types in the utf8 tables it uses through
pcre2_ord2utf() so it better matches its current use, and other changes
in pcre2test.

While at it fix a typo in ManyConfigTests that was introduced in 0d0ac3a
(Update EBCDIC support to support testing on normal ASCII systems (PCRE2Project#656),
2025-02-12)
@carenas carenas marked this pull request as ready for review August 31, 2025 09:35
@carenas carenas requested a review from NWilson August 31, 2025 09:55
@NWilson NWilson merged commit 1074e9e into PCRE2Project:master Sep 1, 2025
35 checks passed
@carenas carenas deleted the ucptest branch September 1, 2025 09:43
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