[pcre-dev] [Bug 2707] pcre2-posix library provides regex sym…

Pàgina inicial
Delete this message
Autor: admin
Data:  
A: pcre-dev
Assumpte: [pcre-dev] [Bug 2707] pcre2-posix library provides regex symbols which clash with system regex if a program links to pcre2-posix indirectly
https://bugs.exim.org/show_bug.cgi?id=2707

Pietro Cerutti <gahr@???> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gahr@???


--- Comment #2 from Pietro Cerutti <gahr@???> ---
We're currently being hit by this in NeoMutt on OpenSUSE, after an upgrade of
OpenSUSE that presumably brought in ncursesw linked against pcre2-posix.

In NeoMutt, we have pcre2 as an optional dependency. We have a module that
handles pre-defined regexes which works with both libc and pcre2:
https://github.com/neomutt/neomutt/blob/59883cac472582b69f0f3dbf8ba1f65e08556650/mutt/prex.c#L307-L337

The issue we have is that because ncursesw brings in pcre2-posix, if we build
without pcre2 support, we don't have HAVE_PCRE2 defined, so we fall-back to the
POSIX API, but those symbols are resolved in pcre2.

The net effect here is that the re->re_nsub member is 0 after a regexec, which
triggers an assert in our code (line 333).

Are you planning on removing the POSIX APIs from the pcre2-posix library and
keeping the #define foo pcre2_foo in the header? If so, do you have a timeline
for a new release with the fix?

Thanks!

--
You are receiving this mail because:
You are on the CC list for the bug.