Commit Graph

450 Commits

Author SHA1 Message Date
Felipe Pena
ee4f5ac1c0 - Fixed EG(saved_fpu_cw) initialization 2010-09-22 00:11:34 +00:00
Felipe Pena
25710a406d - Added EG(saved_fpu_cw_ptr) initialization 2010-07-10 13:56:33 +00:00
Dmitry Stogov
f0c8366a9e - use interned strings for auto globals
- $GLOBALS became a JIT autoglobal, so it's initialized only if used (this may affect opcode caches)
2010-07-08 14:05:11 +00:00
Dmitry Stogov
1a1178a685 eliminated unnecessary iterations during request startup/shutdown 2010-07-06 11:40:17 +00:00
Dmitry Stogov
f23e857676 Fixed ZTS build 2010-05-24 17:07:52 +00:00
Felipe Pena
0a6bcd44a7 - Removed allow_call_time_pass_reference (Pierrick) 2010-04-26 00:13:34 +00:00
David Soria Parra
ebd12eba95 Remove unused variable 2010-04-25 18:34:36 +00:00
David Soria Parra
08b9fdc8a3 Add DTrace probes 2010-04-24 13:32:30 +00:00
Dmitry Stogov
dd5c478be6 Added concept of interned strings. All strings constants known at compile time are allocated in a single copy and never changed. 2010-04-20 11:05:54 +00:00
Dmitry Stogov
94dd83722b Changed the structure of op_array.opcodes. The constant values are moved from opcode operands into a separate literal table 2010-04-20 10:57:45 +00:00
Sebastian Bergmann
d2281d1dff sed -i "s#1998-2009#1998-2010#g" **/*.c **/*.h **/*.php 2010-01-05 20:46:53 +00:00
David Soria Parra
e8359d3f90 - Fixed bug #49142 (crash when exception thrown from __tostring()) 2009-10-27 13:02:36 +00:00
Rasmus Lerdorf
f90425316a Tweak to make this compile with gcc2 2009-06-16 16:10:15 +00:00
Jani Taskinen
1033af1cb3 MFH: Fixed module loading order and made request shutdown functions also to
be loaded in reverse like all other shutdowns are.
2009-05-13 18:48:20 +00:00
Dmitry Stogov
da9405de72 Fixed bug #47714 (autoloading classes inside exception_handler leads to crashes) 2009-03-26 10:56:45 +00:00
Dmitry Stogov
31c0af245e Fixed floating point mathematic speed degradation (Christian) 2009-03-18 10:18:10 +00:00
Dmitry Stogov
d3d02fbc83 Fixed zend_print_zval_r_ex() to use the write callback function 2009-02-18 10:55:08 +00:00
Marcus Boerger
2aba368462 - MFH Catch exceptions in cli -a 2009-01-02 13:14:49 +00:00
Marcus Boerger
2faea53de2 - Sync with HEAD, no ability to not start builtin functions 2008-12-31 14:05:22 +00:00
Marcus Boerger
63d00f7006 - MFH Move stdClass registering where it should be 2008-12-31 12:26:33 +00:00
Sebastian Bergmann
08659c2dcd MFH: Bump copyright year, 3 of 3. 2008-12-31 11:15:49 +00:00
Marcus Boerger
826cc0dc3d - MFH Provide a core module that contains all Zend and php/main (in 5.3 incl. stdClass) 2008-12-30 20:15:28 +00:00
Felipe Pena
85ab423565 - MFH: Removed some TSRMLS_FETCH()s 2008-08-15 19:47:33 +00:00
Marcus Boerger
32f9d0e180 - MFH Improve exception linking 2008-08-14 10:24:52 +00:00
Felipe Pena
cf7384aa40 - MFH: Constness (Added const qualifier to several function parameters) 2008-08-12 17:20:25 +00:00
Hannes Magnusson
d619b57efa MFH: Add E_USER_DEPRECATED (patch by Lars Strojny) 2008-07-21 09:41:00 +00:00
Rui Hirokawa
c3286f32ef implemented again zend-multibyte for PHP 5.3 2008-06-29 08:21:35 +00:00
Dmitry Stogov
2ecf4bb0a7 Lazy EG(active_symbol_table) initialization 2008-04-29 08:15:20 +00:00
Dmitry Stogov
fcaa1c6d86 Fixed bug #44226 (Throwing an exception causes crash in multithreaded SAPI) 2008-04-17 10:21:38 +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
Rasmus Lerdorf
10afe5d96b Make the sigsetjmp change more robust. On systems that don't have
sigsetjmp use setjmp.  Windows is of course weird in that it seems to
have sigsetjmp but not sigjmp_buf (??) so force it to use setjmp in
config.w32.h.in
2008-03-18 21:14:28 +00:00
Rasmus Lerdorf
c9e0781d2a Use sigsetjmp and siglongjmp instead of setjmp/longjmp in order to be
consistent in how we deal with the signal mask.  POSIX doesn't specify
what to do with the signal mask in setjmp/longjmp which has resulted in
the signal mask getting saved on *BSD and not getting saved on Linux.
Making the behaviour explicit via sigsetjmp/siglongjmp gives us
consistency and saves expensive sigprocmask() syscalls on *BSD.
2008-03-18 18:34:11 +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
Marcus Boerger
af316021e8 - Rewrite scanner to be based on re2c instead of flex
The full patch is available as:
  http://php.net/~helly/php-re2c-5.3-20080316.diff.txt
  This is against php-re2c repository version 98
  An older patch against version 97 is available under:
  http://php.net/~helly/php-re2c-97-20080316.diff.txt
2008-03-16 21:06:55 +00:00
Felipe Pena
fd0d44f0a7 User error handlers no longer catch supressed errors (patch by Etienne Kneuss) 2008-03-08 21:54:03 +00:00
Dmitry Stogov
ab232458c7 Optimized require_once() and include_once() by eliminationg open() syscall on second usage. 2008-03-05 13:34:12 +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
Derick Rethans
13d75ce6e6 - MFH: Send the debug info to stderr instead of stdout. 2008-01-28 20:34:02 +00:00
Derick Rethans
3bd291e118 - MFH: Show GC statistics if GC benchmarking is enabled.
#- Discussed this with Dmitry.
2008-01-24 10:42:12 +00:00
Dmitry Stogov
71592cec06 Added garbage collector 2008-01-22 09:27:48 +00:00
Sebastian Bergmann
d1dded8751 MFH: Bump copyright year, 2 of 2. 2007-12-31 07:17:19 +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
Marcus Boerger
8ce1211a62 - MFH debug object helper 2007-10-11 01:03:19 +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
Jani Taskinen
226c56fe76 MFH: Fixed compiler warnings 2007-07-21 00:35:15 +00:00
Antony Dovgal
3c6d2617e7 MFH: fix build on Tru64 2007-04-26 19:08:58 +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
50ea26760d - Avoid sprintf, even when checked copy'n'paste or changes lead to errors 2007-02-24 02:17:47 +00:00
Dmitry Stogov
2f586e965e Fixed bug #39969 (ini setting short_open_tag has no effect when using --enable-maintainer-zts) 2007-01-12 14:37:46 +00:00
Dmitry Stogov
2e1a2438b5 Fixed bug #35634 (Erroneous "Class declarations may not be nested" error raised). (Carl P. Corliss) 2007-01-11 16:47:32 +00:00
Sebastian Bergmann
4223aa4d5e MFH: Bump year. 2007-01-01 09:36:18 +00:00
Antony Dovgal
7b281be1ee that was not intentional
thanks Nuno
2006-12-28 22:12:08 +00:00
Antony Dovgal
28421f4f19 MFH 2006-12-28 21:02:14 +00:00
Ilia Alshanetsky
ff9d0fcc78 is_numeric_string() optimization
# Original Patch by Matt Wilmas
2006-12-26 16:44:20 +00:00
Antony Dovgal
4d44a5b71d MFH: use BSD licensed implementation of double-to-string utilities instead of LGPL one
this patch also fixes thread safety issues in zend_strtod()
2006-12-06 09:52:51 +00:00
Dmitry Stogov
a84a2eae6a Fixed bug #39344 (Unnecessary calls to OnModify callback routine for an extension INI directive). (wharmby at uk dot ibm dot com, Dmitry) 2006-11-08 11:04:27 +00:00
Marcus Boerger
978dd0fdd9 - MFH: Fix issue with some mangeled properties 2006-11-03 19:01:40 +00:00
Dmitry Stogov
31acd1c26e Fixed bug #39140 (Uncaught exception may cause crash) 2006-10-16 11:13:08 +00:00
Sara Golemon
eed736d010 MFH(r-1.376): Preserve EG(return_value_ptr_ptr) when calling zend_execute_scripts()
Reapplying this since it looks like we'll be doing a PHP 5.2 RC6 after all
2006-10-06 16:50:21 +00:00
Sara Golemon
fd9b7f672b Revert until 5.2's release since we're in RC stage 2006-10-06 00:02:56 +00:00
Sara Golemon
67fac322af MFH(r-1.376): Preserve EG(return_value_ptr_ptr) when calling zend_execute_scripts() 2006-10-05 23:32:52 +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
Ilia Alshanetsky
8405e1741f Use proper write callback 2006-08-19 16:20:08 +00:00
Marcus Boerger
519ed8e13b - Better fix for #34505 and related, drop zend_unmangle_property_name_ex() 2006-07-24 17:58:32 +00:00
Antony Dovgal
ca7875ab83 fetch tsrm_ls, don't use it uninitialized 2006-07-19 06:32:52 +00:00
Dmitry Stogov
29ed52ffa4 New memory manager 2006-07-18 09:06:33 +00:00
Antony Dovgal
9d57621235 MFH: initialize EG(exit_status) in ZTS mode 2006-07-12 18:10:56 +00:00
Stefan Esser
7bbf35320d MFH: Added hook for compile_string() 2006-06-13 12:57:48 +00:00
Ilia Alshanetsky
f1fb77d1aa Make zend_print_zval_r_ex() use the write callback function. 2006-06-11 16:28:24 +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
6c61aeb012 SAPI globals are destroied at this point and reporting errors about memory leaks can cause crash. 2006-06-02 13:30:55 +00:00
Dmitry Stogov
14f6b9149d Optimized zend_try/zend_catch macroses (eliminated memcpy()) 2006-05-19 06:09:15 +00:00
Ilia Alshanetsky
21724432de Fixed bug #35512 (Lack of read permission on main script results in
E_WARNING rather then E_ERROR).
2006-05-17 13:27:51 +00:00
Marcus Boerger
b3c3c6de14 - Missing __toString() pieces 2006-05-12 00:21:00 +00:00
Antony Dovgal
7412202c43 no need to destroy the zval here 2006-05-11 22:41:37 +00:00
Marcus Boerger
d76c516176 - Missing __ToString() sync 2006-05-10 21:13:22 +00:00
Marcus Boerger
848c5c7695 - Missing __tostring() conversion snippets 2006-05-10 19:36:47 +00:00
Antony Dovgal
8a03fc5ef3 add missing parts of E_RECOVERABLE merge 2006-05-10 14:04:18 +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
0fab5aacce fix compilation on AIX 2006-03-30 21:39:01 +00:00
Antony Dovgal
a93bd9d493 fix #36878 (error messages are printed even though an exception has been thrown) 2006-03-27 22:07:38 +00:00
Dmitry Stogov
c31c984365 Optimization of module unloading (temporary modules can be only in the end) 2006-03-17 08:34:16 +00:00
Marcus Boerger
7addae5089 - MFH Use object handler get in the same way as the rest of the engine does 2006-03-02 00:45:28 +00:00
Marcus Boerger
3840e428bb - MFH Fix string-conversion and const updating 2006-03-01 17:21:04 +00:00
Andi Gutmans
61e93ccfe8 - Update copyright notices to 2006 2006-01-04 23:53:05 +00:00
Dmitry Stogov
8768ab94b3 Fixed bug #34729 (Crash in ZTS mode under Apache) 2005-12-01 11:48:17 +00:00
Dmitry Stogov
0a5d10a5b9 Fixed bug #35373 (HP-UX "alias not allowed in this configuration") 2005-11-30 10:29:44 +00:00
Dmitry Stogov
a8c6b992b8 Fixed bug #35147 (__HALT_COMPILER() breaks with --enable-zend-multibyte) 2005-11-15 13:29:39 +00:00
Dmitry Stogov
9e1beb4f1c Fixed bug #35009 (ZTS: Persistent resource destruct crashes when extension is compiled as shared) 2005-11-07 12:24:55 +00:00
Antony Dovgal
f43767b249 fix #34505 (possible memory corruption when unmangling properties with empty names)
1st part
2005-09-16 17:05:09 +00:00
Dmitry Stogov
21698c12fe Fixed huge memory leak in ZTS mode (backport from HEAD) 2005-09-12 09:06:15 +00:00
foobar
916815b779 Bump up the year 2005-08-03 13:30:58 +00:00
Dmitry Stogov
1c82ec11a1 Fixed bug #33802 (throw Exception in error handler causes crash) 2005-07-22 07:33:03 +00:00
foobar
990aa7456e - Fixed bug #31358 (Older GCC versions do not provide portable va_copy()). 2005-06-27 22:04:41 +00:00
Dmitry Stogov
47676bc067 Fixed OS X compatibility 2005-06-15 19:05:55 +00:00
Dmitry Stogov
cec2347c96 Fixed bug #33212 ([GCC 4]: 'zend_error_noreturn' aliased to external symbol 'zend_error').
The fix is not tested on Solaris and DARWIN!
2005-06-13 11:22:59 +00:00
Dmitry Stogov
59a46c34fa Fixed double call to php_stream_close() on compiler errors 2005-06-09 16:57:43 +00:00
Dmitry Stogov
e0b0ae9ce7 Fixed bug #25922 (In error handler, modifying 5th arg (errcontext) may result in seg fault) 2005-06-09 10:32:08 +00:00
Stanislav Malyshev
6ba1dd9cbc fix leak 2005-05-22 11:10:38 +00:00