php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74045 memcache: compile warnings and runtime failure wrt. weirdly inlined functions
Submitted: 2017-02-05 10:22 UTC Modified: 2021-03-25 16:40 UTC
From: php at bof dot de Assigned: cmb (profile)
Status: Closed Package: memcache (PECL)
PHP Version: 5.6.30 OS: openSUSE tumbleweed
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: php at bof dot de
New email:
PHP Version: OS:

 

 [2017-02-05 10:22 UTC] php at bof dot de
Description:
------------
PECL memcache-3.0.8 fails with GCC 6 ("gcc version 6.2.1 20161209 [gcc-6-branch revision 243481] (SUSE Linux)" in openSUSE tumbleweed current)

There are clear build warnings wrt. inline functions in memcache_pool.h and memcache_queue.h, as shown below. At runtime, use of any real memcache operation after connect, results in "symbol lookup failure" messages, and aborts the script run.

The attached patch fixes the issue, by removing the "inline" in the four memcache_{pool,queue}.{c,h} files.

In file included from /usr/src/phb/build/release-5.6.28/memcache/php_memcache.h:34:0,
                 from /usr/src/phb/build/release-5.6.28/memcache/memcache.c:30:
/usr/src/phb/build/release-5.6.28/memcache/memcache.c: At top level:
/usr/src/phb/build/release-5.6.28/memcache/memcache_pool.h:395:12: warning: inline function ‘mmc_prepare_key’ declared but never defined
 inline int mmc_prepare_key(zval *, char *, unsigned int *);
            ^~~~~~~~~~~~~~~


Test script:
---------------
$mc = new Memcache();
$mc->connect('127.0.0.1', '11211', 5);
$mc->set('a', 23); # or any other real operation

Expected result:
----------------
works

Actual result:
--------------
/usr/bin/php5: symbol lookup error: /opt/php/extensions/memcache.so: undefined symbol: mmc_queue_pop


Patches

memcache-uninline.patch (last revision 2017-02-05 10:24 UTC by php at bof dot de)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-03-25 16:40 UTC] cmb@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
 [2021-03-25 16:40 UTC] cmb@php.net
The official bug tracker for PECL/memcache is now at
<https://github.com/websupport-sk/pecl-memcache/issues>.

So, if this is still an issue with either of the current memcache
versions (4 or 8), please file an issue there.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 11:01:29 2024 UTC