pcre2: Backport a fix causing duplicate symbol definitions#108685
Closed
simpkins wants to merge 1 commit intogodotengine:masterfrom
Closed
pcre2: Backport a fix causing duplicate symbol definitions#108685simpkins wants to merge 1 commit intogodotengine:masterfrom
simpkins wants to merge 1 commit intogodotengine:masterfrom
Conversation
modules/regex/SCsub compiles the pcre2 sources twice: once for 16-bit and once for 32-bit code unit width. Most of the pcre2 code uses a `PCRE2_SUFFIX()` macro to append the code unit width suffix to the function name to avoid conflicting function names when compiling this way. However, this was missed for the internal `chd_smul` function, resulting in both the 16-bit and 32-bit versions defining a function with the same name. The duplicate symbol definition was only triggering a warning at link time and was not causing the build to fail, but this means that either the 16-bit or 32-bit code will end up calling a function that operates on the incorrect data type. This backports the fix already applied upstream. (Buried in one line of PCRE2Project/pcre2@9a868b060) pcre2 does not yet have any new releases that include this fix.
Member
|
Apologies for missing this PR until now. This was superseded in The change is still relevant for 4.5 and 4.4, and I noticed that pcre2 10.46 was a security update, so I made #114766 to update the stable branches to 10.46 and include this fix at the same time. Thanks for the contribution! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
modules/regex/SCsub compiles the pcre2 sources twice: once for 16-bit and once for 32-bit code unit width. Most of the pcre2 code uses a
PCRE2_SUFFIX()macro to append the code unit width suffix to the function name to avoid conflicting function names when compiling this way. However, this was missed for the internalchd_smulfunction, resulting in both the 16-bit and 32-bit versions defining a function with the same name. The duplicate symbol definition was only triggering a warning at link time and was not causing the build to fail, but this means that either the 16-bit or 32-bit code will end up calling a function that operates on the incorrect data type.This backports the fix already applied upstream. (Buried in one line of PCRE2Project/pcre2@9a868b060) pcre2 does not yet have any new releases that include this fix.