|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2012-01-21 04:55 UTC] rasmus@php.net
-Status: Open
+Status: Feedback
[2012-01-21 04:55 UTC] rasmus@php.net
[2012-01-23 08:17 UTC] uw@php.net
[2012-01-23 08:28 UTC] uw@php.net
[2012-01-23 08:28 UTC] uw@php.net
-Status: Feedback
+Status: Closed
-Assigned To:
+Assigned To: uw
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 07:00:01 2025 UTC |
Description: ------------ APC: pecl/svn - trunk (Revision 322504) PHP: 5_4, svn - PHP 5.4.0RC7-dev Static build: ./configure --enable-apc --enable-debug --enable-maintainer-zts Valgrind barks at APC, like this: ==31961== Conditional jump or move depends on uninitialised value(s) ==31961== at 0x81B137A: apc_new_interned_string (apc_string.c:82) ==31961== by 0x81A02D4: apc_string_pmemcpy (apc_compile.c:283) ==31961== by 0x81A054B: my_copy_zval (apc_compile.c:338) ==31961== by 0x819FFC5: my_copy_zval_ptr (apc_compile.c:219) ==31961== by 0x81A1A51: my_copy_hashtable_ex (apc_compile.c:925) ==31961== by 0x81A05D4: my_copy_zval (apc_compile.c:349) ==31961== by 0x81A1C52: apc_copy_zval (apc_compile.c:990) ==31961== by 0x819E6A1: apc_cache_store_zval (apc_cache.c:1114) ==31961== by 0x819E8A1: apc_cache_make_user_entry (apc_cache.c:1158) ==31961== by 0x8197464: _apc_store (php_apc.c:610) ==31961== by 0x81977AC: apc_store_helper (php_apc.c:669) ==31961== by 0x8197876: zif_apc_add (php_apc.c:689) ==31961== ==31961== Conditional jump or move depends on uninitialised value(s) ==31961== at 0x81B1444: apc_new_interned_string (apc_string.c:109) ==31961== by 0x81A02D4: apc_string_pmemcpy (apc_compile.c:283) ==31961== by 0x81A054B: my_copy_zval (apc_compile.c:338) ==31961== by 0x819FFC5: my_copy_zval_ptr (apc_compile.c:219) ==31961== by 0x81A1A51: my_copy_hashtable_ex (apc_compile.c:925) ==31961== by 0x81A05D4: my_copy_zval (apc_compile.c:349) ==31961== by 0x81A1C52: apc_copy_zval (apc_compile.c:990) ==31961== by 0x819E6A1: apc_cache_store_zval (apc_cache.c:1114) ==31961== by 0x819E8A1: apc_cache_make_user_entry (apc_cache.c:1158) ==31961== by 0x8197464: _apc_store (php_apc.c:610) ==31961== by 0x81977AC: apc_store_helper (php_apc.c:669) ==31961== by 0x8197876: zif_apc_add (php_apc.c:689) This is because APC does not initialize its interned_string buffer in apc_interned_strings_init() .Please, consider initializing the buffer to get rid of the warnings - may not be the worst idea for a string buffer. nixnutz@linux-0v4u:~/php-src/branches/PHP_5_4/ext/apc> svn diff Index: apc_string.c =================================================================== --- apc_string.c (Revision 322504) +++ apc_string.c (Arbeitskopie) @@ -198,6 +198,7 @@ int count = APCG(shm_strings_buffer) / (sizeof(Bucket) + sizeof(Bucket*) * 2); apc_interned_strings_data = (apc_interned_strings_data_t*) apc_sma_malloc(APCG(shm_strings_buffer) TSRMLS_CC); + memset((char *)apc_interned_strings_data, 0, APCG(shm_strings_buffer)); CREATE_LOCK(APCSG(lock)); Test script: --------------- valgrind sapi/cli/php -d apc.enable_cli=1 -r '$tmp = array("foo" => "bar"); apc_add("tmp", $tmp); var_dump(apc_fetch("tmp")); '