php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60986 pcre_get_compiled_regex_cache: php_pcre.c: undefined reference to 'pcre_info'
Submitted: 2012-02-06 10:06 UTC Modified: 2012-02-06 18:23 UTC
Votes:3
Avg. Score:4.7 ± 0.5
Reproduced:3 of 3 (100.0%)
Same Version:0 (0.0%)
Same OS:2 (66.7%)
From: j0inty at stollfuss dot net Assigned: rasmus (profile)
Status: Closed Package: PCRE related
PHP Version: 5.4.0RC7 OS: Linux
Private report: No CVE-ID: None
 [2012-02-06 10:06 UTC] j0inty at stollfuss dot net
Description:
------------
Hi,

If you try to compile the current RC7 of php 5.4.0 the Linker crash with the following message.

ext/pcre/php_pcre.o: In function `pcre_get_compiled_regex_cache':
php_pcre.c:(.text+0xb8f): undefined reference to `pcre_info'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Fehler 1

The reason is the new libpcre-8.30 which was today in my update list.

dev-libs/libpcre-8.30-r2

You can find a full build.log posted on http://paste.pocoo.org/show/546652/ .

regards
j0inty


Patches

pcre_info.patch (last revision 2012-02-06 12:58 UTC by pierre at archlinux dot de)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-02-06 13:04 UTC] pierre at archlinux dot de
This also affects the 5.3 branch. The problem is the use of the pcre_info function which was deprecated and repalced by pcre_fullinfo 12 years ago. This function was now removed with pcre 8.30.

I only found one real use of it and some exports; I have attached a patch that might work. Note the I have no idea about php internals; so this might be entirely stupid or dangerous.

Also note that you might not be able to compile the apache module as apache itself seems also to be incompatible with pcre 8.30

Greetings,

Pierre
 [2012-02-06 16:42 UTC] rasmus@php.net
-Status: Open +Status: Critical
 [2012-02-06 18:01 UTC] olemarkus at gentoo dot org
Regarding the proposed patch, we were alerted about a possible null pointer dereference. See https://bugs.gentoo.org/show_bug.cgi?id=402357#c10
 [2012-02-06 18:11 UTC] rasmus@php.net
Automatic comment from SVN on behalf of rasmus
Revision: http://svn.php.net/viewvc/?view=revision&revision=323096
Log: Fix for bug 60986
 [2012-02-06 18:18 UTC] rasmus@php.net
Automatic comment from SVN on behalf of rasmus
Revision: http://svn.php.net/viewvc/?view=revision&revision=323097
Log: Safer way to call pcre_fullinfo - bug 60986
 [2012-02-06 18:23 UTC] rasmus@php.net
Fix committed to 5.3/5.4/trunk and will be in the next releases.
 [2012-02-06 18:23 UTC] rasmus@php.net
-Status: Critical +Status: Closed -Assigned To: +Assigned To: rasmus
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Oct 28 00:03:33 2021 UTC