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: 2021-03-25 16:45 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: cmb (profile)
Status: Closed Package: memcache (PECL)
PHP Version: Irrelevant OS: Linux
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: 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
 [2021-03-25 16:45 UTC] cmb@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
 [2021-03-25 16:45 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: Sat Apr 20 01:01:28 2024 UTC