|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #61064 SegFault on memcache get
Submitted: 2012-02-12 21:30 UTC Modified: 2012-02-12 21:36 UTC
Avg. Score:4.0 ± 0.9
Reproduced:9 of 9 (100.0%)
Same Version:8 (88.9%)
Same OS:9 (100.0%)
From: pada at hrz dot tu-chemnitz dot de Assigned:
Status: Open Package: memcache (PECL)
PHP Version: Irrelevant OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: pada at hrz dot tu-chemnitz dot de
New email:
PHP Version: OS:


 [2012-02-12 21:30 UTC] pada at hrz dot tu-chemnitz dot de
Affected Versions:

Debian GNU/Linux
* php5 5.3.10
* php5-memcache 3.0.6

CentOS 6
* php-5.3.3
* php-pecl-memcache-3.0.5 and php-pecl-memcache-3.0.6

Seems similar to closed bug #57605

Test script:
$m=new Memcache; $m->addServer("s1."); $a = array(1=>1); $r = $m->get($a);

Expected result:
No Segmentation Fault

Actual result:
[root] # php -r '$m=new Memcache; $m->addServer("s1."); $a = array(1=>1); $r = 
PHP Warning:  MemcachePool::get(): php_network_getaddresses: getaddrinfo failed: 
Temporary failure in name resolution in Command line code on line 1
Segmentation fault

Backtrace from httpd 2.2.15 on CentOS 6 with reproducer code:

[root] # HOME=/root gdb --batch --eval-command='zbacktrace' --
exec=/usr/sbin/httpd --core=/var/run/httpd/core.httpd.21125 2>/dev/null
[New Thread 21125]
[Thread debugging using libthread_db enabled]
Core was generated by `/usr/sbin/httpd'.
Program terminated with signal 11, Segmentation fault.
#0  0x00007f710fccabce in zend_inline_hash_func (ht=0x7f711b05e350, arKey=0x1 
<Address 0x1 out of bounds>, nKeyLength=2) at /usr/src/debug/php-
282                     case 2: hash = ((hash << 5) + hash) + *arKey++; /* 
fallthrough... */
[0x7f70e74a6050] get(array(1)[0x7f711b05b350]) /var/www/htdocs/bug.php:1


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-02-12 21:36 UTC] pada at hrz dot tu-chemnitz dot de
-Summary: SegFault on memache get +Summary: SegFault on memcache get
 [2012-02-12 21:36 UTC] pada at hrz dot tu-chemnitz dot de
Fixed subject
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Jan 23 14:01:23 2021 UTC