[MDEV-5620] CMake option to compile against an external PCRE library Created: 2014-02-06  Updated: 2014-03-04  Resolved: 2014-03-04

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.0.8
Fix Version/s: 10.0.9

Type: Bug Priority: Critical
Reporter: Alexander Barkov Assignee: Sergei Golubchik
Resolution: Fixed Votes: 1
Labels: 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().



 Comments   
Comment by Sergei Golubchik [ 2014-02-19 ]

Our PCRE stack_guard patch is now in Mageia.

Comment by Sergei Golubchik [ 2014-02-19 ]

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.

Comment by Oden Eriksson [ 2014-02-19 ]

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...)

Generated at Thu Feb 08 07:05:45 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.