Re: segfault after an "invalid read of size 8"

From: Date: Fri, 10 Oct 2008 18:56:59 +0000
Subject: Re: segfault after an "invalid read of size 8"
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-40932@lists.php.net to get a copy of this message
Thanks, with this version I obtain this valgrind output : ==6577== Conditional jump or move depends on uninitialised value(s)
==6577==    at 0x6CB2DB: _zend_mm_free_int (zend_alloc.c:1941)
==6577==    by 0x710210: ZEND_CONCAT_SPEC_CV_TMP_HANDLER (zend_variables.h:35)
==6577==    by 0x709D63: execute (zend_vm_execute.h:92)
==6577==    by 0x6DA33C: zend_call_function (zend_execute_API.c:1015)
==6577==    by 0x6DB3C5: call_user_function_ex (zend_execute_API.c:640)
==6577==    by 0x6DB441: call_user_function (zend_execute_API.c:613)
==6577==    by 0x627DAA: user_shutdown_function_call (basic_functions.c:5311)
==6577==    by 0x6F158A: zend_hash_apply (zend_hash.c:673)
==6577==    by 0x628065: php_call_shutdown_functions (basic_functions.c:5395)
==6577==    by 0x6A2B44: php_request_shutdown (main.c:1446)
==6577==    by 0x75B0B3: main (php_cli.c:1315)
==6577== ==6577== Use of uninitialised value of size 8
==6577==    at 0x6CB33A: _zend_mm_free_int (zend_alloc.c:1963)
==6577==    by 0x710210: ZEND_CONCAT_SPEC_CV_TMP_HANDLER (zend_variables.h:35)
==6577==    by 0x709D63: execute (zend_vm_execute.h:92)
==6577==    by 0x6DA33C: zend_call_function (zend_execute_API.c:1015)
==6577==    by 0x6DB3C5: call_user_function_ex (zend_execute_API.c:640)
==6577==    by 0x6DB441: call_user_function (zend_execute_API.c:613)
==6577==    by 0x627DAA: user_shutdown_function_call (basic_functions.c:5311)
==6577==    by 0x6F158A: zend_hash_apply (zend_hash.c:673)
==6577==    by 0x628065: php_call_shutdown_functions (basic_functions.c:5395)
==6577==    by 0x6A2B44: php_request_shutdown (main.c:1446)
==6577==    by 0x75B0B3: main (php_cli.c:1315)
==6577== ==6577== Invalid read of size 1
==6577==    at 0x6CB33A: _zend_mm_free_int (zend_alloc.c:1963)
==6577==    by 0x710210: ZEND_CONCAT_SPEC_CV_TMP_HANDLER (zend_variables.h:35)
==6577==    by 0x709D63: execute (zend_vm_execute.h:92)
==6577==    by 0x6DA33C: zend_call_function (zend_execute_API.c:1015)
==6577==    by 0x6DB3C5: call_user_function_ex (zend_execute_API.c:640)
==6577==    by 0x6DB441: call_user_function (zend_execute_API.c:613)
==6577==    by 0x627DAA: user_shutdown_function_call (basic_functions.c:5311)
==6577==    by 0x6F158A: zend_hash_apply (zend_hash.c:673)
==6577==    by 0x628065: php_call_shutdown_functions (basic_functions.c:5395)
==6577==    by 0x6A2B44: php_request_shutdown (main.c:1446)
==6577==    by 0x75B0B3: main (php_cli.c:1315)
==6577== Address 0x706eda800 is not stack'd, malloc'd or (recently) free'd ==6577== ==6577== Process terminating with default action of signal 11 (SIGSEGV) ==6577== Access not within mapped region at address 0x706EDA800
==6577==    at 0x6CB33A: _zend_mm_free_int (zend_alloc.c:1963)
==6577==    by 0x710210: ZEND_CONCAT_SPEC_CV_TMP_HANDLER (zend_variables.h:35)
==6577==    by 0x709D63: execute (zend_vm_execute.h:92)
==6577==    by 0x6DA33C: zend_call_function (zend_execute_API.c:1015)
==6577==    by 0x6DB3C5: call_user_function_ex (zend_execute_API.c:640)
==6577==    by 0x6DB441: call_user_function (zend_execute_API.c:613)
==6577==    by 0x627DAA: user_shutdown_function_call (basic_functions.c:5311)
==6577==    by 0x6F158A: zend_hash_apply (zend_hash.c:673)
==6577==    by 0x628065: php_call_shutdown_functions (basic_functions.c:5395)
==6577==    by 0x6A2B44: php_request_shutdown (main.c:1446)
==6577==    by 0x75B0B3: main (php_cli.c:1315)
==6577== ==6577== ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 66 from 4) ==6577== malloc/free: in use at exit: 2,641,381 bytes in 12,114 blocks. ==6577== malloc/free: 13,138 allocs, 1,024 frees, 7,178,513 bytes allocated. ==6577== For counts of detected errors, rerun with: -v ==6577== searching for pointers to 12,114 not-freed blocks. ==6577== checked 2,441,216 bytes. ==6577== ==6577== LEAK SUMMARY:
==6577==    definitely lost: 292 bytes in 11 blocks.
==6577==      possibly lost: 0 bytes in 0 blocks.
==6577==    still reachable: 2,641,089 bytes in 12,103 blocks.
==6577==         suppressed: 0 bytes in 0 blocks.
==6577== Rerun with --leak-check=full to see details of leaked memory. Felipe Pena a écrit :
Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi In case of segfaulting with the latest version, file a bug at http://bugs.php.net Thanks. :)


« previous php.internals (#40932) next »