|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2012-07-17 14:53 UTC] webmaster at mailz dot de
Description: ------------ we are currently getting crashes with our code and apc. As this is not easily reproducible i am not quite sure how to pinpoint the code that causes it. We also get 2 different backtraces for the same part of the code. We are using PHP 5.4.4 with APC 3.1.10 with the patch from https://bugs.php.net/bug.php?id=62190 Expected result: ---------------- should not crash Actual result: -------------- Program received signal SIGSEGV, Segmentation fault. _zend_mm_free_int (heap=0x17c2330, p=0x2b7f830) at /usr/local/src/php/php- 5.4.4/php-5.4.4/Zend/zend_alloc.c:2100 2100 /usr/local/src/php/php-5.4.4/php-5.4.4/Zend/zend_alloc.c: No such file or directory. in /usr/local/src/php/php-5.4.4/php-5.4.4/Zend/zend_alloc.c (gdb) bt #0 _zend_mm_free_int (heap=0x17c2330, p=0x2b7f830) at /usr/local/src/php/php- 5.4.4/php-5.4.4/Zend/zend_alloc.c:2100 #1 0x00000000007a7d55 in _zval_dtor (zval_ptr=0x2ba8c78) at /usr/local/src/php/php-5.4.4/php-5.4.4/Zend/zend_variables.h:35 #2 _zval_ptr_dtor (zval_ptr=0x2ba8c78) at /usr/local/src/php/php-5.4.4/php- 5.4.4/Zend/zend_execute_API.c:438 #3 0x00007fbfe168f3ef in apc_free_class_entry_after_execution (src=0x2ba6a40) at /usr/local/src/php/php-5.4-extensions/APC-3.1.10/apc_compile.c:1835 #4 0x00007fbfe169241c in apc_deactivate () at /usr/local/src/php/php-5.4- extensions/APC-3.1.10/apc_main.c:956 #5 apc_request_shutdown () at /usr/local/src/php/php-5.4-extensions/APC- 3.1.10/apc_main.c:1012 #6 0x00007fbfe1688f05 in zm_deactivate_apc (type=24912688, module_number=45611056) at /usr/local/src/php/php-5.4-extensions/APC- 3.1.10/php_apc.c:407 #7 0x00000000007ba634 in zend_deactivate_modules () at /usr/local/src/php/php- 5.4.4/php-5.4.4/Zend/zend_API.c:2333 #8 0x0000000000759f25 in php_request_shutdown (dummy=<value optimized out>) at /usr/local/src/php/php-5.4.4/php-5.4.4/main/main.c:1750 #9 0x000000000085b62a in main (argc=<value optimized out>, argv=<value optimized out>) at /usr/local/src/php/php-5.4.4/php-5.4.4/sapi/cgi/cgi_main.c:2498 zend_mm_remove_from_free_list (heap=0x17c2330, mm_block=0x3c63d90) at /usr/local/src/php/php-5.4.4/php-5.4.4/Zend/zend_alloc.c:833 833 /usr/local/src/php/php-5.4.4/php-5.4.4/Zend/zend_alloc.c: No such file or directory. in /usr/local/src/php/php-5.4.4/php-5.4.4/Zend/zend_alloc.c (gdb) bt #0 zend_mm_remove_from_free_list (heap=0x17c2330, mm_block=0x3c63d90) at /usr/local/src/php/php-5.4.4/php-5.4.4/Zend/zend_alloc.c:833 #1 0x00000000007913fb in _zend_mm_free_int (heap=0x17c2330, p=0x3c63d48) at /usr/local/src/php/php-5.4.4/php-5.4.4/Zend/zend_alloc.c:2101 #2 0x00000000007c1341 in zend_hash_destroy (ht=0x3c63968) at /usr/local/src/php/php-5.4.4/php-5.4.4/Zend/zend_hash.c:565 #3 0x00000000007b4016 in _zval_dtor_func (zvalue=0x3d4bca8) at /usr/local/src/php/php-5.4.4/php-5.4.4/Zend/zend_variables.c:43 #4 0x00000000007a7d55 in _zval_dtor (zval_ptr=0x3cea680) at /usr/local/src/php/php-5.4.4/php-5.4.4/Zend/zend_variables.h:35 #5 _zval_ptr_dtor (zval_ptr=0x3cea680) at /usr/local/src/php/php-5.4.4/php- 5.4.4/Zend/zend_execute_API.c:438 #6 0x00007fbfe168f3ef in apc_free_class_entry_after_execution (src=0x3d4b9f0) at /usr/local/src/php/php-5.4-extensions/APC-3.1.10/apc_compile.c:1835 #7 0x00007fbfe169241c in apc_deactivate () at /usr/local/src/php/php-5.4- extensions/APC-3.1.10/apc_main.c:956 #8 apc_request_shutdown () at /usr/local/src/php/php-5.4-extensions/APC- 3.1.10/apc_main.c:1012 #9 0x00007fbfe1688f05 in zm_deactivate_apc (type=24912688, module_number=63323536) at /usr/local/src/php/php-5.4-extensions/APC- 3.1.10/php_apc.c:407 #10 0x00000000007ba634 in zend_deactivate_modules () at /usr/local/src/php/php- 5.4.4/php-5.4.4/Zend/zend_API.c:2333 #11 0x0000000000759f25 in php_request_shutdown (dummy=<value optimized out>) at /usr/local/src/php/php-5.4.4/php-5.4.4/main/main.c:1750 #12 0x000000000085b62a in main (argc=<value optimized out>, argv=<value optimized out>) at /usr/local/src/php/php-5.4.4/php-5.4.4/sapi/cgi/cgi_main.c:2498 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 31 16:00:01 2025 UTC |
Program received signal SIGSEGV, Segmentation fault. _zend_mm_free_int (heap=0x10b4330, p=0x2077f88) at /usr/local/src/php/php- 5.4.5/php-5.4.5/Zend/zend_alloc.c:2100 2100 if (ZEND_MM_IS_FREE_BLOCK(next_block)) { (gdb) bt #0 _zend_mm_free_int (heap=0x10b4330, p=0x2077f88) at /usr/local/src/php/php- 5.4.5/php-5.4.5/Zend/zend_alloc.c:2100 #1 0x00000000007a9ae5 in _zval_dtor (zval_ptr=0x19070d8) at /usr/local/src/php/php-5.4.5/php-5.4.5/Zend/zend_variables.h:35 #2 _zval_ptr_dtor (zval_ptr=0x19070d8) at /usr/local/src/php/php-5.4.5/php- 5.4.5/Zend/zend_execute_API.c:438 #3 0x00007fe6cda1e25f in apc_free_class_entry_after_execution (src=0x212a278) at /usr/local/src/php/php-5.4-extensions/apc-svn/apc_compile.c:2015 #4 0x00007fe6cda217ec in apc_deactivate () at /usr/local/src/php/php-5.4- extensions/apc-svn/apc_main.c:948 #5 apc_request_shutdown () at /usr/local/src/php/php-5.4-extensions/apc- svn/apc_main.c:1042 #6 0x00007fe6cda17585 in zm_deactivate_apc (type=17515312, module_number=34045832) at /usr/local/src/php/php-5.4-extensions/apc- svn/php_apc.c:407 #7 0x00000000007bc404 in zend_deactivate_modules () at /usr/local/src/php/php- 5.4.5/php-5.4.5/Zend/zend_API.c:2333 #8 0x000000000075bb35 in php_request_shutdown (dummy=<value optimized out>) at /usr/local/src/php/php-5.4.5/php-5.4.5/main/main.c:1750 #9 0x000000000085d3fa in main (argc=<value optimized out>, argv=<value optimized out>) at /usr/local/src/php/php-5.4.5/php- 5.4.5/sapi/cgi/cgi_main.c:2498 this is the new backtrace with apc-trunkAs a workaround, try to replace the INVALID constant in the $messageTemplates array in Zend_Validate_Hostname (or in Zend\Validator\Hostname in ZF2) with a string representation. Like this: diff --git a/vendor/zendframework/zendframework/library/Zend/Validator/Hostname.php b/vendor/zendframework/zendframework/library/Zend/Validator/Hostname.php index d780cd5..a7d1153 100644 --- a/vendor/zendframework/zendframework/library/Zend/Validator/Hostname.php +++ b/vendor/zendframework/zendframework/library/Zend/Validator/Hostname.php @@ -44,7 +44,7 @@ class Hostname extends AbstractValidator */ protected $messageTemplates = array( self::CANNOT_DECODE_PUNYCODE => "The input appears to be a DNS hostname but the given punycode notation cannot be decoded", - self::INVALID => "Invalid type given. String expected", + 'hostnameInvalid' => "Invalid type given. String expected", self::INVALID_DASH => "The input appears to be a DNS hostname but contains a dash in an invalid position", self::INVALID_HOSTNAME => "The input does not match the expected structure for a DNS hostname", self::INVALID_HOSTNAME_SCHEMA => "The input appears to be a DNS hostname but cannot match against hostname schema for TLD '%tld%'",