Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-5620

CMake option to compile against an external PCRE library

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 10.0.8
    • 10.0.9
    • None
    • None

    Description

      Under terms of MDEV-5304 we upgraded PCRE to 8.34
      but did not add a CMake options to compile against an
      external PCRE library.
      We should eventually add a CMake option.

      The problem is that using an external PCRE is dangerous
      because of a possible stack overrun, which we fix in the bundled
      PCRE with the patch pcre/maria-patches/pcre_stack_guard.diff.

      There are some options:
      a. wait for the PCRE team to add some built-in means to watch the stack
      b. use the current PCRE version and check the pattern against
      nested parenthesis every time we call pcre_compile().

      Attachments

        Activity

          Our PCRE stack_guard patch is now in Mageia.

          serg Sergei Golubchik added a comment - Our PCRE stack_guard patch is now in Mageia.

          I suppose now we can allow system PCRE if it supports pcre_stack_guard (cmake can check for it). When official PCRE will have a solution for this stack overflow we can extend the CMakeLists.txt to check for this solution too.

          serg Sergei Golubchik added a comment - I suppose now we can allow system PCRE if it supports pcre_stack_guard (cmake can check for it). When official PCRE will have a solution for this stack overflow we can extend the CMakeLists.txt to check for this solution too.
          oden Oden Eriksson added a comment - - edited

          PCRE upstream accepted the stack guard patch with some small changes. This patch has been added to the mageia cauldron packages.

          Here's the upstream one: "svn diff -r\1453:1454 svn://vcs.exim.org/pcre/code/trunk"

          (had to escape the first revision, weird...)

          oden Oden Eriksson added a comment - - edited PCRE upstream accepted the stack guard patch with some small changes. This patch has been added to the mageia cauldron packages. Here's the upstream one: "svn diff -r\1453:1454 svn://vcs.exim.org/pcre/code/trunk" (had to escape the first revision, weird...)

          People

            serg Sergei Golubchik
            bar Alexander Barkov
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.