php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64708 apc_store() in CLI with apc.enable_cli=0 segfaults.
Submitted: 2013-04-25 09:48 UTC Modified: 2013-04-25 10:10 UTC
From: andre at roaldseth dot net Assigned: remi (profile)
Status: Closed Package: Reproducible crash
PHP Version: 5.4.14 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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: andre at roaldseth dot net
New email:
PHP Version: OS:

 

 [2013-04-25 09:48 UTC] andre at roaldseth dot net
Description:
------------
CentOS 6.4 with php-pecl-apcu.x86_64 from remi repo.

It crashes consistently on apc_store() if apc.enable_cli=0. 

Test script:
---------------
var_dump(apc_store("foo", "bar"));

Expected result:
----------------
It should result in true.

Actual result:
--------------
It segfaults.

andrer@vg-dev-01:~/VGF (/trunk)$ gdb --args php -r 'apc_store("foo", "bar");'
GNU gdb (GDB) Red Hat Enterprise Linux (7.2-60.el6)
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/php...(no debugging symbols found)...done.
Missing separate debuginfos, use: debuginfo-install php-cli-5.4.14-
1.el6.remi.x86_64
(gdb) run
Starting program: /usr/bin/php -r apc_store\(\"foo\",\ \"bar\"\)\;
[Thread debugging using libthread_db enabled]
[New Thread 0x7fffdef53700 (LWP 18656)]
[Thread 0x7fffdef53700 (LWP 18656) exited]

Program received signal SIGSEGV, Segmentation fault.
0x00007fffedb2b691 in apc_cache_serializer () from 
/usr/lib64/php/modules/apcu.so
(gdb) thread apply all backtrace

Thread 1 (Thread 0x7ffff7fe17e0 (LWP 18637)):
#0  0x00007fffedb2b691 in apc_cache_serializer () from 
/usr/lib64/php/modules/apcu.so
#1  0x00007fffedb2ab44 in ?? () from /usr/lib64/php/modules/apcu.so
#2  0x000000000065bfcc in ?? ()
#3  0x00000000006497d8 in execute ()
#4  0x00000000005d2d1e in zend_eval_stringl ()
#5  0x00000000005d2df9 in zend_eval_stringl_ex ()
#6  0x000000000068ad44 in ?? ()
#7  0x000000000068b768 in ?? ()
#8  0x00007ffff4f0ccdd in __libc_start_main () from /lib64/libc.so.6
#9  0x0000000000423f89 in _start ()

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-04-25 10:10 UTC] remi@php.net
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.

Fixed in https://github.com/krakjoe/apcu/commit/d192f6081164ba5ec5b05dce8e5c0b50b5d7b35d

Closing as APCu bugs not (yet) managed here.
 [2013-04-25 10:10 UTC] remi@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: remi
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 05 07:01:32 2024 UTC