Bug 22173 - Update pcre (needed for mariadb update)
Summary: Update pcre (needed for mariadb update)
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: All Packagers
QA Contact:
URL: https://bugs.exim.org/show_bug.cgi?id...
Whiteboard:
Keywords: NEEDINFO
Depends on:
Blocks: 22078
  Show dependency treegraph
 
Reported: 2017-12-12 00:10 CET by Marc Krämer
Modified: 2017-12-14 16:00 CET (History)
3 users (show)

See Also:
Source RPM: pcre
CVE:
Status comment:


Attachments

Description Marc Krämer 2017-12-12 00:10:45 CET
cmake test for stacksize >256 fails which prevents e.g. mariadb update

Performing C SOURCE FILE Test PCRE_STACK_SIZE_OK failed with the following output:
[...]
Return value: 1
Source file was:


#include <pcre.h>
        int main() {
        return -pcre_exec(NULL, NULL, NULL, -999, -999, 0, NULL, 0) < 256;
        }
Comment 1 Marc Krämer 2017-12-12 01:12:21 CET
looks like cmake does not recognize our pcre_stack_guard patch (see https://jira.mariadb.org/browse/MDEV-5620)


the cmake test for pcre is as follows:
INCLUDE (CheckCSourceRuns)

SET(WITH_PCRE "auto" CACHE STRING
   "Which pcre to use (possible values are 'bundled', 'system', or 'auto')")

MACRO (CHECK_PCRE)
  IF(WITH_PCRE STREQUAL "system" OR WITH_PCRE STREQUAL "auto")
    CHECK_LIBRARY_EXISTS(pcre pcre_stack_guard "" HAVE_PCRE_STACK_GUARD)
    IF(NOT CMAKE_CROSSCOMPILING)
      SET(CMAKE_REQUIRED_LIBRARIES "pcre")
      CHECK_C_SOURCE_RUNS("
        #include <pcre.h>
        int main() {
        return -pcre_exec(NULL, NULL, NULL, -999, -999, 0, NULL, 0) < 256;
        }"  PCRE_STACK_SIZE_OK)
      SET(CMAKE_REQUIRED_LIBRARIES)
    ENDIF()
  ENDIF()
  IF(NOT HAVE_PCRE_STACK_GUARD OR NOT PCRE_STACK_SIZE_OK OR
     WITH_PCRE STREQUAL "bundled")
    IF (WITH_PCRE STREQUAL "system")
      MESSAGE(FATAL_ERROR "system pcre is not found or unusable")
    ENDIF()
    SET(PCRE_INCLUDES ${CMAKE_BINARY_DIR}/pcre ${CMAKE_SOURCE_DIR}/pcre)
    ADD_SUBDIRECTORY(pcre)
  ENDIF()
ENDMACRO()
Comment 2 Marja Van Waes 2017-12-13 07:09:18 CET
Assigning to all packagers collectively, since the registered maintainer for this package is currently unavailable.

CC'ing the Perl maintainers, because this library is "Perl-compatible", which might be a reason for one of them to update pcre.

CC: (none) => marja11, perl
Assignee: bugsquad => pkg-bugs

Marja Van Waes 2017-12-13 07:09:57 CET

Summary: Update pcre => Update pcre (needed for mariadb update)

Comment 3 Marja Van Waes 2017-12-13 08:08:58 CET
I had missed that pcre-8.41-2.mga7 was pushed yesterday.... does it fix the problem?

Keywords: (none) => NEEDINFO

Comment 4 Marc Krämer 2017-12-13 09:42:57 CET
Not really. I'm still investigation what is wrong.

My latest findings are:
CHECK_LIBRARY_EXISTS(pcre pcre_stack_guard "" HAVE_PCRE_STACK_GUARD)

produces a file which results in Segmentation fault, since it calls pcre_stack_guard which is null by default. I'm not sure, if this definition/test is faulty, or if this function has to be defined (in the lib?).

A stack check which is not implemented is quite useless...
Marc Krämer 2017-12-13 14:15:13 CET

Blocks: (none) => 22078

Marc Krämer 2017-12-14 15:00:24 CET

URL: (none) => https://bugs.exim.org/show_bug.cgi?id=2173

Comment 5 Marc Krämer 2017-12-14 15:00:57 CET
we have an external

CC: (none) => jackal.j

Comment 6 Marc Krämer 2017-12-14 15:02:53 CET
we have an external Bugreport for pcre, since the stacksize is not determined correctly, if the library is compiled with -O2 or higher (which is the default in mga).

I suggest to patch pcre and see, if the new version returns a stack size bigger than 4 bytes. (call of pcretest -m -C)
Comment 7 Jack M 2017-12-14 15:26:49 CET
The bug report on jira seems to be pretty old one, and if upstream has accepted it then maybe it is not related to the current issue?
Comment 8 Jack M 2017-12-14 15:39:29 CET
According to the exim link, there seems to be no fix. They are talking about using pcre2 for the next mariadb release.
Comment 9 Marc Krämer 2017-12-14 16:00:06 CET
I've added the patch and it does correct the mentioned behaviour.

So, now the stacksize is correct. After pcre rel 3 is built and you've installed it, this should work for mariadb!

Closing this one as resolved, see you in the mariadb udpate bug ;-)

Status: NEW => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.