Commit Graph

474 Commits

Author SHA1 Message Date
Dmitry Stogov
64c721e04e *** empty log message *** 2008-07-26 19:14:38 +00:00
Dmitry Stogov
8ee5b58bbe Added checks for destroied objects 2008-07-26 18:32:20 +00:00
Dmitry Stogov
b25f9f6a6a Added support for overloaded functions (e.g. COM) in call_user_func(). 2008-07-26 17:01:40 +00:00
Dmitry Stogov
af05ce0af6 Fixed is_callable/call_user_func mess that had done different things for very similar arguments e.g. array("A","B") and "A::B" 2008-07-26 13:14:04 +00:00
Dmitry Stogov
691d4a6999 Fixed uninitialised data 2008-07-25 08:23:07 +00:00
Dmitry Stogov
feb8580166 LSB parent/self forwarding 2008-07-24 09:42:18 +00:00
Dmitry Stogov
d5ef2f466c Added support for lambda functions and closures 2008-07-14 09:49:03 +00:00
Felipe Pena
2af92fa836 - Fixed bug #45180 ('class::method' works differently than array('class', 'method')) 2008-06-05 18:50:29 +00:00
Felipe Pena
cc23d3bade - Fixed bug #45089 (__callStatic $name case sensitivity) 2008-06-03 18:11:12 +00:00
Dmitry Stogov
5521912b15 Use IS_CV for dirrent access to $this variable 2008-05-07 12:04:39 +00:00
Dmitry Stogov
0639a847ce Use lazy symbol table initialization for op_arrays called from internal php functions 2008-05-06 17:00:56 +00:00
Dmitry Stogov
833e01343d GC fix 2008-05-06 16:03:16 +00:00
Dmitry Stogov
3a86a06619 Added missing lazy initialization 2008-04-29 09:18:26 +00:00
Dmitry Stogov
2ecf4bb0a7 Lazy EG(active_symbol_table) initialization 2008-04-29 08:15:20 +00:00
Dmitry Stogov
d9dd1b9e14 Optimized ZEND_RETURN opcode to not allocate and copy return value if it is not
used.
2008-04-11 09:43:28 +00:00
Felipe Pena
f66f55edc5 MFH: Implemented "jump label" operator (limited "goto")
[DOC]
2008-03-28 14:35:01 +00:00
Rasmus Lerdorf
ea790cef01 On Windows I guess there is no point starting the timeout thread until
we actually have a timeout value.
2008-03-19 15:30:49 +00:00
Rasmus Lerdorf
d2f23dbe64 Make sure we set the signal handler when reset_signals is true, regardless
of the actual timeout value.
2008-03-19 15:22:17 +00:00
Rasmus Lerdorf
6c158374ba exit_on_timeout patch
After the sigsetjmp change, this is patch #2 in an effort to get some
sanity restored to signal handling in PHP.

This patch does two things.  First, it makes it possible to reset the
timeout without resetting the signal handlers.  This is important for
cases where an extension may have deferred signals in its MINIT in order
to implement critical sections. It also lays the groundwork for cleaning
up our signal handling and perhaps eventually implementing our own
signal deferring mechanism so we can have true critical sections.

The second thing this does is to make it possible to terminate the current
child process (only for Apache1 at the moment) on a timeout.  There are
a number of extensions that are unhappy about being longjmp'ed out of
and when this happens on a timeout they are left in an inconsistent state.
By turning on exit_on_timeout you can now force the process to terminate
on a timeout which will clean up any hanging locks and/or memory left
hanging after the longjmp.
2008-03-18 21:42:50 +00:00
Felipe Pena
2b10c53ae1 MFH: Dropped zend.ze1_compatibility_mode
[DOC]
2008-03-18 14:10:45 +00:00
Dmitry Stogov
8c885b8913 Implemented concept of "delayed early binding" that allows opcode caches to perform class declaration (early and/or run-time binding) in exactly the same order as vanila php.
The following pseudo-code explains how it should be used in opcode cache.

function cache_compile_file($filename) {
        if (!is_cached($filename)) {
                ...
                orig_compiler_options = CG(compiler_optins);
                CG(compiler_options) |= ZEND_COMPILE_IGNORE_INTERNAL_CLASSES |
                                        ZEND_COMPILE_DELAYED_BINDING;
                $op_array = orig_compile_file($filename);
                CG(compiler_options) = orig_copiler_options;
                ...
        } else {
                $op_array = restore_from_cache($filename);
        }
        zend_do_delayed_early_binding($op_array);
}
2008-03-18 08:36:30 +00:00
Antony Dovgal
1f3b8cccc4 %v -> %s, this is 5_3 2008-03-09 20:52:29 +00:00
Dmitry Stogov
430e54d457 Fixed shared memory corruption of opcode caches 2008-03-04 11:43:51 +00:00
Marcus Boerger
d3e5026564 - MFH Add E_DEPRECATED (Lars Strojny, Felipe Pena, Marcus)
[DOC] Finally added deprecation messages
2008-02-23 17:06:22 +00:00
Marcus Boerger
da5b979f88 - MFH Add comment that explains why we need E_ERROR in those cases 2008-02-02 15:48:04 +00:00
Marcus Boerger
95a3cccf5f - Fix flag handling in message generation 2008-02-02 13:56:59 +00:00
Dmitry Stogov
9770b3cb00 Fixed bug #43323 (Wrong count abstract methods). (Felipe, Dmitry) 2008-01-29 11:12:57 +00:00
Dmitry Stogov
0b6825102d Changed EG(argument_stack) implementation. 2008-01-24 09:41:39 +00:00
Dmitry Stogov
71592cec06 Added garbage collector 2008-01-22 09:27:48 +00:00
Dmitry Stogov
fa47e900e2 Changed exception handling. Now each op_array doesn't contain ZEND_HANDLE_EXCEPTION opcode in the end 2008-01-21 19:39:55 +00:00
Marcus Boerger
ba8acfdfdf - Fix the fix 2008-01-15 11:47:05 +00:00
Marcus Boerger
22221def71 - Fix memleak (found by colder) 2008-01-14 18:13:12 +00:00
Dmitry Stogov
ed8e2fa031 Added missing warning message 2008-01-10 09:38:23 +00:00
Sebastian Bergmann
d1dded8751 MFH: Bump copyright year, 2 of 2. 2007-12-31 07:17:19 +00:00
Dmitry Stogov
43f6392e90 Fixed bug #43651 (is_callable() with one or more nonconsecutive colons crashes) 2007-12-25 10:58:30 +00:00
Dmitry Stogov
6484b3c458 Fixed bug #43344 (Wrong error message for undefined namespace constant) 2007-12-07 17:11:24 +00:00
Dmitry Stogov
648fbe9d58 Fixed bug #43128 (Very long class name causes segfault) 2007-11-22 13:27:13 +00:00
Johannes Schlüter
45f6b4ce2f - MFH Improved version of ternary shortcut (Marcus) 2007-11-21 09:41:35 +00:00
Dmitry Stogov
c3ab6bd091 Fixed bug #43136 (possible crash on script execution timeout. The EG(function_state_ptr) is completely removed, EG(current_execute_data)->function_state must be used instead) 2007-11-20 09:51:12 +00:00
Jani Taskinen
b489251177 - MFH from HEAD:
. Folding tags
  . Parameter parsing
  . SPL debug info
  . array function improvements (not all yet)
  . Improvements to function calling with call_user_* functions
  . Improvements to debugging info in var_dump/print_r
# I propably forgot already something but this all was pretty close tied
# to each other so it wasn't possible to do it in parts.
2007-11-02 19:40:39 +00:00
Dmitry Stogov
f10766f1fb Reimplemented support for namespaces in indexes id constant arrays (removed zval.idx_type) 2007-11-02 10:11:42 +00:00
Yiduo (David) Wang
4b4d634cb9 MFH: Added macros for managing zval refcounts and is_ref statuses 2007-10-07 05:22:07 +00:00
Dmitry Stogov
eb0c56ada1 Fixed bug #42820 (defined() on constant with namespace prefixes tries to load class). 2007-10-03 10:33:02 +00:00
Dmitry Stogov
220641af70 Fixed bug #42819 (namespaces in indexes of constant arrays) 2007-10-02 08:26:50 +00:00
Dmitry Stogov
3a3a7e7441 Fixed bug #42798 (__autoload() not triggered for classes used in method signature). 2007-10-01 09:32:48 +00:00
Dmitry Stogov
72d0454bf6 Added support for __callstatic() magic method (missing part). (Sara) 2007-09-29 09:34:24 +00:00
Dmitry Stogov
166266df68 Added support for Late Static Binding. (Dmitry, Etienne Kneuss) 2007-09-29 07:28:34 +00:00
Dmitry Stogov
f32ffe9b43 Namespaces 2007-09-28 19:52:53 +00:00
Dmitry Stogov
6c810b0d4c Improved memory usage by movig constants to read only memory. (Dmitry, Pierre) 2007-09-27 18:00:48 +00:00
Jani Taskinen
226c56fe76 MFH: Fixed compiler warnings 2007-07-21 00:35:15 +00:00
Dmitry Stogov
1c7fa8fb4c Fixed bug #41633 (Crash instantiating classes with self-referencing constants) 2007-06-13 16:48:10 +00:00
Dmitry Stogov
28bc39500a Fixed some class constant issues related to bug #41633 2007-06-13 14:50:13 +00:00
Antony Dovgal
04aefb4e18 MFH 2007-05-21 07:12:41 +00:00
Antony Dovgal
d7b30e457a MFH: fix #41421 (Uncaught exception from a stream wrapper segfaults) 2007-05-18 11:52:08 +00:00
Antony Dovgal
de4f3007e2 MFH: initialize retval_ptr_ptr before returning FAILURE
this fixes invalid read in #41209
2007-04-27 08:12:24 +00:00
Dmitry Stogov
e1814f0dbe WIN64 support 2007-04-16 08:09:56 +00:00
Antony Dovgal
79ed194a64 fix #40815 (using strings like "class::func" and static methods in set_exception_handler() might result in crash) 2007-03-15 16:44:12 +00:00
Marcus Boerger
b15d1f22ef - Catch empty class name error earlier 2007-03-03 13:45:14 +00:00
Dmitry Stogov
0291ad5fa6 Fixed bug #40236 (php -a function allocation eats memory) 2007-02-15 10:38:28 +00:00
Sebastian Bergmann
4223aa4d5e MFH: Bump year. 2007-01-01 09:36:18 +00:00
Ilia Alshanetsky
96d9d6f0f1 Avoid strcpy() & strcat() 2006-12-28 00:17:48 +00:00
Antony Dovgal
bed14f8ab7 MFH 2006-12-21 11:08:00 +00:00
Dmitry Stogov
011e0cde62 Start timiout thread on Windows only if necessary 2006-11-10 11:49:35 +00:00
Johannes Schlüter
6841110122 - MFH: added missing return... 2006-10-18 17:04:49 +00:00
Johannes Schlüter
dcf249004c - MFH: Fix #38465 (ReflectionParameter fails if default value is an access to self:: 2006-10-18 16:35:15 +00:00
Antony Dovgal
630024d895 MFH 2006-10-11 16:11:56 +00:00
Dmitry Stogov
ecd52167d7 Fixed wrong return value 2006-09-28 07:16:31 +00:00
Antony Dovgal
d6ee9d4810 MFH: fix #38779 (engine crashes when require()'ing file with syntax error through userspace stream wrapper) 2006-09-11 14:30:08 +00:00
Dmitry Stogov
8bb047ee97 Fixed bug #36759 (Objects destructors are invoked in wrong order when script is finished). 2006-07-12 07:54:00 +00:00
Stefan Esser
7bbf35320d MFH: Added hook for compile_string() 2006-06-13 12:57:48 +00:00
Zeev Suraski
51d495850a Restore ZE1 compatibility mode (Zend Engine part - the modules patches
will follow later today)
2006-06-05 13:58:52 +00:00
Dmitry Stogov
26ccde4da9 Fixed bug #37558 (timeout functionality doesn't work after a second PHP starup on the same thread). (p dot desarnaud at wanadoo dot fr) 2006-05-25 07:46:25 +00:00
Marcus Boerger
637a40423c - MFH as discussed
. zend_exception_get_default() -> zend_exception_get_default(TSRMLS_D)
  . zend_get_error_exception()   -> zend_get_error_exception(TSRMLS_D)
  . added E_RECOVERABLE_ERROR
  . added ZEND_TOSTRING_FUNC_NAME
  . added __tostring function cache to zend_class_entry
  . added ZEND_NAMED_ME
  . modified ZEND_ME_MAPPING to support method flags
  . added ZEND_MN
  . method entries now use prefix "zim_" instead of "zif_"
  . drop EG(ze1_compatibility_mode)
  . changed cast handler, now without (int should_free):
    typedef int (*zend_object_cast_t)(zval *readobj, zval *retval, int type TSRMLS_DC);
  . changed get_iterator, now receives whether value is by ref:
    zend_object_iterator *(*get_iterator)(zend_class_entry *ce, zval *object, int by_ref TSRMLS_DC);
  . added zend_objects_store_add_ref_by_handle
  . added zend_objects_store_del_ref_by_handle
  . convert_to_explicit_type(pzv, type)
2006-05-09 23:53:23 +00:00
Antony Dovgal
32872b157e there is no %v in 5_1 2006-04-20 22:49:20 +00:00
Dmitry Stogov
d82462485e FIX: For some reason SIGSEGV handler wasn't set, but was restoring. Now all SIGSEGV related code is commented. 2006-03-17 08:47:41 +00:00
Dmitry Stogov
161ae714ae zend_hash_apply() doesn't use ZEND_HASH_APPLY_... macros 2006-03-14 11:24:45 +00:00
Dmitry Stogov
ad10a538ee Optimized cleanup loops on request shutdown 2006-03-13 11:13:42 +00:00
Dmitry Stogov
54adfc6fcf Fixed incorrect backtrace type ("::" instead of "->") for __set()/__get() 2006-03-03 12:06:29 +00:00
Marcus Boerger
5a69b29082 - Warning fixes by Steph 2006-02-26 10:57:00 +00:00
Marcus Boerger
941b0651dc - MFH: Function deprecation flag 2006-02-25 18:25:45 +00:00
Marcus Boerger
b1cebf32e4 - MFH Fix issues with static method invocation 2006-01-22 22:14:32 +00:00
Antony Dovgal
01e8d313c8 MFH: make sure ce_child is properly initialized 2006-01-18 21:06:47 +00:00
Andi Gutmans
61e93ccfe8 - Update copyright notices to 2006 2006-01-04 23:53:05 +00:00
Dmitry Stogov
9c2ea13abc Fixed bug #35612 (iis6 Access Violation crash). (alacn dot uhahaa at gmail dot com) 2005-12-22 16:46:15 +00:00
Antony Dovgal
9255733c4f fix leak appearing when __autoload() throws an exception 2005-12-20 11:25:34 +00:00
Marcus Boerger
0cd997d79c - Simplify and synch is_callable_ex() with actual execution code
. Allow array($this, 'parent::method') for function 'pointers'
  . Spit out E_STRICT in case of erroneous use of function 'pointers'
2005-12-16 22:15:41 +00:00
Dmitry Stogov
599221036f Fixed bug #35612 (iis6 Access Violation crash) 2005-12-09 18:10:45 +00:00
Dmitry Stogov
9ee0707cfa Fixed bug #35509 (string constant as array key has different behavior inside object) 2005-12-05 08:56:09 +00:00
Dmitry Stogov
a570981151 Fixed bug #35360 (exceptions in interactive mode (php -a) may cause crash) 2005-11-24 11:33:11 +00:00
Dmitry Stogov
8212034254 Fixed SIGSEGV 2005-10-27 19:25:52 +00:00
Dmitry Stogov
03cb8e959b Fixed bug #34767 (Zend Engine 1 Compatibility not copying objects correctly) 2005-10-20 08:14:59 +00:00
Dmitry Stogov
9305339d94 Changed "instanceof" and "catch" operators, is_a() and is_subclass_of() functions to not call __autoload(). 2005-09-09 06:48:49 +00:00
Dmitry Stogov
6319efa013 Fixed bug #34260 (Segfault with callbacks (array_map) + overloading) 2005-09-02 07:47:28 +00:00
foobar
916815b779 Bump up the year 2005-08-03 13:30:58 +00:00
Dmitry Stogov
650cdaed12 Fixed bug #33942 (the patch to #33156 crash cygwin except cli) 2005-08-02 17:01:17 +00:00
foobar
2a8cd27f4e bug #33865 2005-07-26 18:33:15 +00:00
Marcus Boerger
e11fc8bda4 - Fix error generation logic (found by johannes) 2005-07-21 16:52:32 +00:00
Dmitry Stogov
c25b8a3699 Fixed bug #33156 (cygwin version of setitimer doesn't accept ITIMER_PROF). (Nuno) 2005-07-12 06:52:59 +00:00
Dmitry Stogov
d9c1a380ad Fixed bug #28072 (static array with some constant keys will be incorrectly ordered). 2005-07-07 15:16:57 +00:00
Dmitry Stogov
1d33a3e95e Fixed bug #31158 (array_splice on $GLOBALS crashes) 2005-07-04 10:01:10 +00:00