hi: In goto vim, execute will be called with empty op_array to initialize handlers, in this moment the executor globals(zts) is not be initialized.
You can have a try without this fix Thanks 发自我的 iPad 在 2012-8-26,4:17,Nikita Popov <[email protected]> 写道: > I don't understand this changeset. Why is it needed / what bug does it > fix? If op_array == NULL, won't it return right after that anyway? > > Nikita > > On Sat, Aug 25, 2012 at 3:47 PM, Xinchen Hui <[email protected]> wrote: >> Commit: d92a89fe52e89eef9527d1e27b5bb051ae24bc54 >> Author: Xinchen Hui <[email protected]> Sat, 25 Aug 2012 21:47:53 >> +0800 >> Parents: 55d680e9682e3218b333d929bf3b24ddfe83c436 >> Branches: PHP-5.3 >> >> Link: >> http://git.php.net/?p=php-src.git;a=commitdiff;h=d92a89fe52e89eef9527d1e27b5bb051ae24bc54 >> >> Log: >> Fixed bug (segfault while build with zts and GOTO vm-kind) >> >> Changed paths: >> M NEWS >> M Zend/zend_vm_execute.skl >> M Zend/zend_vm_gen.php >> >> >> Diff: >> diff --git a/NEWS b/NEWS >> index 9af7977..69cbb2a 100644 >> --- a/NEWS >> +++ b/NEWS >> @@ -3,6 +3,7 @@ PHP >> NEWS >> ?? ??? 2012, PHP 5.3.16 >> >> - Core: >> + . Fixed bug (segfault while build with zts and GOTO vm-kind). (Laruence) >> . Fixed bug #62763 (register_shutdown_function and extending class). >> (Laruence) >> . Fixed bug #62744 (dangling pointers made by zend_disable_class). >> (Laruence) >> diff --git a/Zend/zend_vm_execute.skl b/Zend/zend_vm_execute.skl >> index 18d0e29..e5a143e 100644 >> --- a/Zend/zend_vm_execute.skl >> +++ b/Zend/zend_vm_execute.skl >> @@ -4,8 +4,8 @@ ZEND_API void {%EXECUTOR_NAME%}(zend_op_array *op_array >> TSRMLS_DC) >> { >> zend_execute_data *execute_data; >> zend_bool nested = 0; >> - zend_bool original_in_execution = EG(in_execution); >> {%HELPER_VARS%} >> + {%EXECUTION_STATUS%} >> >> {%INTERNAL_LABELS%} >> >> diff --git a/Zend/zend_vm_gen.php b/Zend/zend_vm_gen.php >> index 86d6503..2fff1a9 100644 >> --- a/Zend/zend_vm_gen.php >> +++ b/Zend/zend_vm_gen.php >> @@ -850,6 +850,13 @@ function gen_executor($f, $skl, $spec, $kind, >> $executor_name, $initializer_name, >> skip_blanks($f, $m[1], >> $m[3]."\n"); >> } >> break; >> + case "EXECUTION_STATUS": >> + if ($kind != ZEND_VM_KIND_GOTO) { >> + out($f, $m[1] . "zend_bool >> original_in_execution = EG(in_execution);\n"); >> + } else { >> + out($f, $m[1] . "zend_bool >> original_in_execution = op_array? EG(in_execution) : 0;\n"); >> + } >> + break; >> case "INTERNAL_LABELS": >> if ($kind == ZEND_VM_KIND_GOTO) { >> // Emit array of labels of opcode >> handlers and code for >> >> >> -- >> PHP CVS Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php >> -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
