php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62802 Crash when use apc_bin_dump/load
Submitted: 2012-08-12 14:30 UTC Modified: 2012-08-12 14:38 UTC
From: laruence@php.net Assigned: laruence (profile)
Status: Closed Package: APC (PECL)
PHP Version: 5.4.5 OS: Linux
Private report: No CVE-ID: None
 [2012-08-12 14:30 UTC] laruence@php.net
Description:
------------
this test script is reported by ab in his comment to #61133.

and the reason of this crash is different with #61133, so I open this new bug 
entry.



Test script:
---------------
one.php:
<?php

apc_compile_file('two.php');
$data = apc_bin_dump(NULL, NULL);
apc_clear_cache();

apc_bin_load($data, APC_BIN_VERIFY_MD5 | APC_BIN_VERIFY_CRC32);

two.php:
<?php

$a = 'uuu';

Expected result:
----------------
no crash

Actual result:
--------------
php crash with backtrace:
#0  0x0000003054430265 in raise () from /lib64/libc.so.6
#1  0x0000003054431d10 in abort () from /lib64/libc.so.6
#2  0x00000030544296e6 in __assert_fail () from /lib64/libc.so.6
#3  0x00002b2c8d6f39d9 in my_copy_zval (dst=0x2b2c8e38c428, src=0x2b2c89fbdca6, 
ctxt=0x7fffeaf42ed0)
    at /home/huixinchen/opensource/pecl/apc/apc_compile.c:393
#4  0x00002b2c8d6f5b40 in apc_copy_op_array (dst=0x2b2c8e38c320, src=0x10aea565, 
ctxt=0x7fffeaf42ed0)
    at /home/huixinchen/opensource/pecl/apc/apc_compile.c:1222
#5  0x00002b2c8d704e5d in apc_bin_load (bd=0x10aea4a0, flags=3) at 
/home/huixinchen/opensource/pecl/apc/apc_bin.c:884
#6  0x00002b2c8d6ee328 in zif_apc_bin_load (ht=2, return_value=0x2b2c89fb9d50, 
return_value_ptr=0x0, this_ptr=0x0, return_value_used=0)
    at /home/huixinchen/opensource/pecl/apc/php_apc.c:1490
#7  0x00000000008eb965 in zend_do_fcall_common_helper_SPEC 
(execute_data=0x2b2c89f830e8)
    at /home/huixinchen/opensource/trunk/Zend/zend_vm_execute.h:642
#8  0x00000000008f3127 in ZEND_DO_FCALL_SPEC_CONST_HANDLER 
(execute_data=0x2b2c89f830e8)
    at /home/huixinchen/opensource/trunk/Zend/zend_vm_execute.h:2219
#9  0x00000000008ea1a3 in execute (op_array=0x2b2c89fbac50) at 
/home/huixinchen/opensource/trunk/Zend/zend_vm_execute.h:410
#10 0x00000000008aed6c in zend_execute_scripts (type=8, retval=0x0, 
file_count=3) at /home/huixinchen/opensource/trunk/Zend/zend.c:1286
#11 0x0000000000822808 in php_execute_script (primary_file=0x7fffeaf469a0) at 
/home/huixinchen/opensource/trunk/main/main.c:2459
#12 0x00000000009fb0d6 in do_cli (argc=2, argv=0x7fffeaf46d68) at 
/home/huixinchen/opensource/trunk/sapi/cli/php_cli.c:988
#13 0x00000000009fc144 in main (argc=2, argv=0x7fffeaf46d68) at 
/home/huixinchen/opensource/trunk/sapi/cli/php_cli.c:1364

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-08-12 14:38 UTC] laruence@php.net
Automatic comment from SVN on behalf of laruence
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=327073
Log: Fixed bug #62802 (Crash when use apc_bin_dump/load)
 [2012-08-12 14:38 UTC] laruence@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: laruence
 [2012-08-12 14:38 UTC] laruence@php.net
This bug has been fixed in SVN.

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.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 02 21:01:31 2024 UTC