PHP 5.3.8 + LSAPI + Guard-5.5.0 crash

General discussion on Zend Guard / Optimizer

PHP 5.3.8 + LSAPI + Guard-5.5.0 crash

Postby mistwang on Tue Dec 13, 2011 9:06 pm

This can be reliably reproduced with gallery (menalto) code, managed to get the valgrind output.

2011-12-13 14:53:25.353 [STDERR] ==185048== Memcheck, a memory error detector
==185048== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==185048== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info
2011-12-13 14:53:25.361 [STDERR] ==185048== Command: ./lsphp-5.3.8
==185048==
2011-12-13 14:53:48.253 [STDERR] ==185048== Use of uninitialised value of size 8
==185048== at 0x5A6CE5B: ??? (in /usr/local/Zend/lib/Guard-5.5.0/php-5.3.x/ZendGuardLoader.so)
==185048== by 0x7E0143: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:320)
==185048== by 0x7E5CBA: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:1640)
==185048== by 0x7DF21A: execute (zend_vm_execute.h:107)
==185048== by 0x5A6DAA5: zend_oe (in /usr/local/Zend/lib/Guard-5.5.0/php-5.3.x/ZendGuardLoader.so)
==185048== by 0x7E031C: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:344)
==185048== by 0x7E1024: ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (zend_vm_execute.h:425)
==185048== by 0x7DF21A: execute (zend_vm_execute.h:107)
==185048== by 0x5A6DAA5: zend_oe (in /usr/local/Zend/lib/Guard-5.5.0/php-5.3.x/ZendGuardLoader.so)
==185048== by 0x79FFA3: zend_call_function (zend_execute_API.c:968)
==185048== by 0x6A2621: zif_call_user_func_array (basic_functions.c:4797)
==185048== by 0x5A6D5A8: ??? (in /usr/local/Zend/lib/Guard-5.5.0/php-5.3.x/ZendGuardLoader.so)
==185048== Uninitialised value was created by a stack allocation
==185048== at 0x5A6CC20: ??? (in /usr/local/Zend/lib/Guard-5.5.0/php-5.3.x/ZendGuardLoader.so)
==185048==
==185048== Invalid read of size 8
==185048== at 0x5A6CE5B: ??? (in /usr/local/Zend/lib/Guard-5.5.0/php-5.3.x/ZendGuardLoader.so)
==185048== by 0x7E0143: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:320)
==185048== by 0x7E5CBA: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:1640)
==185048== by 0x7DF21A: execute (zend_vm_execute.h:107)
==185048== by 0x5A6DAA5: zend_oe (in /usr/local/Zend/lib/Guard-5.5.0/php-5.3.x/ZendGuardLoader.so)
==185048== by 0x7E031C: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:344)
==185048== by 0x7E1024: ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (zend_vm_execute.h:425)
==185048== by 0x7DF21A: execute (zend_vm_execute.h:107)
==185048== by 0x5A6DAA5: zend_oe (in /usr/local/Zend/lib/Guard-5.5.0/php-5.3.x/ZendGuardLoader.so)
==185048== by 0x79FFA3: zend_call_function (zend_execute_API.c:968)
==185048== by 0x6A2621: zif_call_user_func_array (basic_functions.c:4797)
==185048== by 0x5A6D5A8: ??? (in /usr/local/Zend/lib/Guard-5.5.0/php-5.3.x/ZendGuardLoader.so)
==185048== Address 0x1feffd910 is not stack'd, malloc'd or (recently) free'd
==185048==
==185048==
==185048== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==185048== Access not within mapped region at address 0x1FEFFD910
==185048== at 0x5A6CE5B: ??? (in /usr/local/Zend/lib/Guard-5.5.0/php-5.3.x/ZendGuardLoader.so)
==185048== by 0x7E0143: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:320)
==185048== by 0x7E5CBA: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:1640)
==185048== by 0x7DF21A: execute (zend_vm_execute.h:107)
==185048== by 0x5A6DAA5: zend_oe (in /usr/local/Zend/lib/Guard-5.5.0/php-5.3.x/ZendGuardLoader.so)
==185048== by 0x7E031C: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:344)
==185048== by 0x7E1024: ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (zend_vm_execute.h:425)
2011-12-13 14:53:48.253 [STDERR] ==185048== by 0x7DF21A: execute (zend_vm_execute.h:107)
==185048== by 0x5A6DAA5: zend_oe (in /usr/local/Zend/lib/Guard-5.5.0/php-5.3.x/ZendGuardLoader.so)
==185048== by 0x79FFA3: zend_call_function (zend_execute_API.c:968)
==185048== by 0x6A2621: zif_call_user_func_array (basic_functions.c:4797)
==185048== by 0x5A6D5A8: ??? (in /usr/local/Zend/lib/Guard-5.5.0/php-5.3.x/ZendGuardLoader.so)
==185048== If you believe this happened as a result of a stack
==185048== overflow in your program's main thread (unlikely but
==185048== possible), you can try to increase the size of the
==185048== main thread stack using the --main-stacksize= flag.
==185048== The main thread stack size used in this run was 10485760.
2011-12-13 14:53:49.869 [STDERR] ==185048==
2011-12-13 14:53:49.878 [STDERR] ==185048== HEAP SUMMARY:
==185048== in use at exit: 8,506,328 bytes in 24,204 blocks
==185048== total heap usage: 38,103 allocs, 13,899 frees, 9,791,831 bytes allocated

If disable ZendGuard in php.ini, the problem is gone.
mistwang
 
Posts: 1
Joined: Tue Dec 13, 2011 8:57 pm

Return to Zend Guard / Optimizer

Who is online

Users browsing this forum: Exabot [Bot], Google [Bot] and 2 guests