summaryrefslogtreecommitdiff
path: root/Zend/zend_execute_API.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/master' into native-tlsAnatol Belski2014-12-161-1/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | * origin/master: Optimize argument passing handlers: Fix pcre non-FAST_ZPP build Conflicts: Zend/zend_compile.c Zend/zend_execute.h Zend/zend_vm_def.h Zend/zend_vm_execute.h ext/pcre/php_pcre.c
| * Optimize argument passing handlers:Dmitry Stogov2014-12-161-1/+0
| | | | | | | | | | | | - predcalculate offsets of passed argument and store it in opline->result.var for ZEND_SEND_*; - don't update "number of passed arguments" op each ZEND_SEND_* opcode, store it on call frame creation - Change ZEND_HANDLE_EXCEPTION to determine "number of passed arguments" in incomplete calls fefore freeing
* | Merge remote-tracking branch 'origin/master' into native-tlsAnatol Belski2014-12-151-6/+3
|\ \ | |/ | | | | | | | | | | | | | | | | * origin/master: made the apache ini holders to be zend_bool Removed useless local variable Use simpler functions Fixed test small fixes to UPGRADING Reorder to save alignment size (of course, only for common used structs)
| * Use simpler functionsDmitry Stogov2014-12-151-6/+3
| |
* | first shot remove TSRMLS_* thingsAnatol Belski2014-12-131-116/+111
|/
* Fixed compilation warningsDmitry Stogov2014-12-121-2/+2
|
* Merge branch 'PHP-5.6'Anatol Belski2014-12-121-118/+41
|\ | | | | | | | | | | | | | | | | | | * PHP-5.6: updated NEWS Fixed bug #68583 Crash in timeout thread Conflicts: Zend/zend_execute.h Zend/zend_execute_API.c
| * Merge branch 'PHP-5.5' into PHP-5.6Anatol Belski2014-12-121-118/+41
| |\ | | | | | | | | | | | | | | | | | | | | | * PHP-5.5: Fixed bug #68583 Crash in timeout thread Conflicts: Zend/zend_execute.h
| | * Fixed bug #68583 Crash in timeout threadAnatol Belski2014-12-121-118/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This replaces the GUI element used for execution timeout handling on Windows. Instead a timer queue technique is used, which is indeed a thread pool. A timer queue timer is a lightweight object handled but that thread pool and the timer thread spends most of the time sleeping and waiting for an alert. Please note also that this introduces neither binary nor source breach. The custom timeout thread functions are deleted, however they was not exported throug DLL, so couldn't be used by any external code. As well they couldn't be used anywhere in the core except in executor api, because those custom timeout thread functions they used to operate on static variables which would be overwritten (and that would blow). So instead a relatively modern technique is used for the timeout handling. It's still not perfect because the executor still has to check EX(timed_out). This can be a topic for an improvement in master. But brobably can be tricky as currently it seems to be not possible to signal an individual thread. Also note another issue that static variables aren't thread safe, but the current timer implementation is.
| | * fix incompatible pointer typesAnatol Belski2014-11-171-2/+6
| | |
| * | fix incompatible pointer typesAnatol Belski2014-11-171-2/+6
| | |
| * | Merge branch 'PHP-5.5' into PHP-5.6Xinchen Hui2014-11-101-7/+0
| |\ \ | | |/
| | * Fixed bug #68370 ("unset($this)" can make the program crash)Xinchen Hui2014-11-101-7/+0
| | |
* | | Moved zend_is_true() from zend_execute.h/zend_execute_API.c into ↵Dmitry Stogov2014-12-111-6/+0
| | | | | | | | | | | | | | | | | | | | | zend_operators.h/zend_operators.c. Splited the most expensive part of inline i_zend_is_true() into a separate zend_object_is_true(). Replaced zendi_convert_to_long() with cals to zend_is_true().
* | | Rename EX_VAR_2() into ZEND_CALL_VAR() and EX_VAR_NUM_2() into ↵Dmitry Stogov2014-11-281-1/+1
| | | | | | | | | | | | ZEND_CALL_VAR_NUM().
* | | Pack EX(frame_info) into EX(This).u1.v.reserved. Rename "frame"kind" into ↵Dmitry Stogov2014-11-281-3/+2
| | | | | | | | | | | | "call_kind" and VM_FRAME_... into ZEND_CALL_...
* | | Pack EX(num_args) into EX(This).u2.num_argsDmitry Stogov2014-11-281-2/+2
| | |
* | | fix incompatible pointer typesAnatol Belski2014-11-171-2/+6
| | |
* | | fix datatype mismatchAnatol Belski2014-11-131-2/+2
| | |
* | | fix datatype mismatchesAnatol Belski2014-10-241-2/+2
| | |
* | | fix datatype mismatches for strings from userspaceAnatol Belski2014-10-221-2/+2
| | |
* | | Review a few more SEPARATE_ZVAL_IF_NOT_REF usagesNikita Popov2014-10-091-2/+2
| | |
* | | Merged EX(frame_kind) and EX(flags) into single wordDmitry Stogov2014-10-071-2/+3
| | |
* | | Fix dynamic calls to static methods with fci->objectNikita Popov2014-10-051-3/+5
| | | | | | | | | | | | func may already be freed at the time the static flag was checked.
* | | Replaced EG(This) and EX(object) with EX(This).Dmitry Stogov2014-10-031-12/+8
| | | | | | | | | | | | Internal functions now recieves zend_execute_data as the first argument.
* | | Removed zend_execute_data->prev_nested_call. Reuse prev_execute_data instead.Dmitry Stogov2014-10-011-1/+0
| | |
* | | Avoid double IS_INTERNED() checkDmitry Stogov2014-09-191-2/+2
| | |
* | | Fixed useless or duplicated IS_INTERNED() checksDmitry Stogov2014-09-191-2/+2
| | |
* | | fix signed/unsigned mismatchAnatol Belski2014-09-151-1/+1
| | |
* | | fix initializer structAnatol Belski2014-09-151-1/+1
| | |
* | | Reintroduce fix from pull #770 in a PHP 7 wayStanislav Malyshev2014-09-011-2/+2
| | |
* | | Revert "Merge branch 'PHP-5.6'"Stanislav Malyshev2014-09-011-2/+2
| | | | | | | | | | | | | | | This reverts commit aaf5689f4d6e523fd78e0291dbbcd78f3ea988dc, reversing changes made to 481bf25b6ad70fcdc9c10f02b49c86a0bd4a3d0d.
* | | Merge branch 'PHP-5.6'Stanislav Malyshev2014-09-011-2/+2
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PHP-5.6: update NEWS Only destruct if EG(active) in zend_shutdown(). (bug #65463, #66036) Fix typo from commit 32314f6b6 Fix destruction order in zend_shutdown (bug #65463, #66036) Conflicts: Zend/zend_compile.h Zend/zend_execute_API.c
| * | Merge branch 'PHP-5.5' into PHP-5.6Stanislav Malyshev2014-09-011-2/+2
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | * PHP-5.5: update NEWS Only destruct if EG(active) in zend_shutdown(). (bug #65463, #66036) Fix typo from commit 32314f6b6 Fix destruction order in zend_shutdown (bug #65463, #66036)
| | * Merge branch 'PHP-5.4' into PHP-5.5Stanislav Malyshev2014-09-011-2/+2
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PHP-5.4: update NEWS Only destruct if EG(active) in zend_shutdown(). (bug #65463, #66036) Fix typo from commit 32314f6b6 Fix destruction order in zend_shutdown (bug #65463, #66036)
| | | * Merge branch 'pull-request/770' into PHP-5.4Stanislav Malyshev2014-09-011-2/+2
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * pull-request/770: Only destruct if EG(active) in zend_shutdown(). (bug #65463, #66036) Fix typo from commit 32314f6b6 Fix destruction order in zend_shutdown (bug #65463, #66036)
| | | | * Fix typo from commit 32314f6b6Keyur Govande2014-08-141-1/+1
| | | | |
| | | | * Fix destruction order in zend_shutdown (bug #65463, #66036)Keyur Govande2014-08-141-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If Apache or a similar SAPI receives a signal during PHP processing it calls zend_shutdown() without calling shutdown_executor(). #65463: If a module like Gearman or Memcached is loaded, in the unfixed version it is unloaded by zend_destroy_modules() before the CG(CLASS_TABLE) is destructed. When CG(CLASS_TABLE) is destructed, any pointers to methods (specifically around destruction) in the unloaded module's .so are now dangling and the process segfaults. #66036: Any subclasses of an internal class like ArrayObject need to be destructed in order: subclass first and then the internal class. In the unfixed version zend_shutdown() clears the CG(CLASS_TABLE) from the head of the list onwards, so internal classes are destructed first and user-defined classes last. Internal classes are alloc/deallocated with malloc/free while user-defined classes with emalloc/efree. If there's shared data between them then efree() could be called instead of free() leading to a seg-fault.
| | | * | Bump yearXinchen Hui2014-01-031-1/+1
| | | | |
| * | | | Merge branch 'PHP-5.5' into PHP-5.6Xinchen Hui2014-06-101-2/+0
| |\ \ \ \ | | |/ / / | | | | | | | | | | | | | | | Conflicts: Zend/zend_execute_API.c
| | * | | Remove unused included fileXinchen Hui2014-06-101-2/+0
| | | | |
| | * | | Bump yearXinchen Hui2014-01-031-1/+1
| | | | |
* | | | | Combine foreach copy / switch cond stacksNikita Popov2014-08-291-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now one common stack to handle both, which stores znodes instead of full oplines (foreach copy stack) or switch entries (switch cond stack). Also removed EG(start_op) while at it.
* | | | | Use efree_size() instead of efree() where posibleDmitry Stogov2014-08-271-3/+3
| | | | |
* | | | | Remove ZEND_ACC_INTERACTIVE and CG(interactive)Nikita Popov2014-08-251-81/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As far as I can discern these are leftovers of the interactive shell implementation that was used before PHP 5.4. Now the readline ext makes use of normal eval calls for this. So, dropping these until there is evidence to the contrary, as they currently wouldn't work anyway.
* | | | | Fix compiler warningsNikita Popov2014-08-251-1/+1
| | | | |
* | | | | Merge remote-tracking branch 'php-src/master' into astNikita Popov2014-08-251-28/+28
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Zend/zend_compile.c Zend/zend_compile.h Zend/zend_globals.h Zend/zend_language_parser.y Zend/zend_language_scanner.c Zend/zend_language_scanner.l Zend/zend_types.h
| * | | | | master renames phase 2Anatol Belski2014-08-251-5/+5
| | | | | |
| * | | | | master renames phase 1Anatol Belski2014-08-251-32/+32
| | | | | |
| * | | | | Merge remote-tracking branch 'php/master'Anatol Belski2014-08-191-0/+1
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: ext/date/lib/parse_date.c