php.net |  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
Votes:10
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:
Package:
Bug Type:
Summary:
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
Description:
------------
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:
---------------
<?php
$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 = 
$m->get($a);'
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-
5.3.3/Zend/zend_hash.h:282
282                     case 2: hash = ((hash << 5) + hash) + *arKey++; /* 
fallthrough... */
[0x7f70e74a6050] get(array(1)[0x7f711b05b350]) /var/www/htdocs/bug.php:1


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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-2019 The PHP Group
All rights reserved.
Last updated: Thu Oct 24 04:01:29 2019 UTC