diff options
author | Ondřej Surý <ondrej@sury.org> | 2012-02-17 12:10:08 +0100 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2012-02-17 12:10:08 +0100 |
commit | f89bb30da3cd51ee2deb566a08e318d6c3995324 (patch) | |
tree | b402687176685db240a0043af98b91f8f8b3737f /Zend | |
parent | 5292df2401c781de56fd04835c18e11162152626 (diff) | |
download | php-f89bb30da3cd51ee2deb566a08e318d6c3995324.tar.gz |
Imported Upstream version 5.4.0~rc8upstream/5.4.0_rc8
Diffstat (limited to 'Zend')
-rw-r--r-- | Zend/Zend.m4 | 12 | ||||
-rw-r--r-- | Zend/tests/bug60139.phpt | 2 | ||||
-rw-r--r-- | Zend/zend.h | 6 | ||||
-rw-r--r-- | Zend/zend_execute.c | 9 | ||||
-rw-r--r-- | Zend/zend_execute_API.c | 10 |
5 files changed, 22 insertions, 17 deletions
diff --git a/Zend/Zend.m4 b/Zend/Zend.m4 index 367c0c21f..557daaad5 100644 --- a/Zend/Zend.m4 +++ b/Zend/Zend.m4 @@ -1,5 +1,5 @@ dnl -dnl $Id: Zend.m4 312377 2011-06-22 14:23:21Z iliaa $ +dnl $Id: Zend.m4 323245 2012-02-16 01:51:45Z stas $ dnl dnl This file contains Zend specific autoconf functions. dnl @@ -393,14 +393,20 @@ int main() AC_CHECK_FUNCS(mremap) +AC_ARG_ENABLE(zend-signals, +[ --enable-zend-signals Use zend signal handling],[ + ZEND_SIGNALS=$enableval +],[ + ZEND_SIGNALS=no +]) + AC_CHECK_FUNC(sigaction, [ - ZEND_SIGNALS=yes - AC_DEFINE(ZEND_SIGNALS, 1, [Use zend signal handling]) AC_DEFINE(HAVE_SIGACTION, 1, [Whether sigaction() is available]) ], [ ZEND_SIGNALS=no ]) if test "$ZEND_SIGNALS" = "yes"; then + AC_DEFINE(ZEND_SIGNALS, 1, [Use zend signal handling]) CFLAGS="$CFLAGS -DZEND_SIGNALS" fi diff --git a/Zend/tests/bug60139.phpt b/Zend/tests/bug60139.phpt index 414fa5651..d5926b28f 100644 --- a/Zend/tests/bug60139.phpt +++ b/Zend/tests/bug60139.phpt @@ -1,5 +1,7 @@ --TEST-- Bug #60139 (Anonymous functions create cycles not detected by the GC) +--INI-- +zend.enable_gc=1 --FILE-- <?php class Foo { diff --git a/Zend/zend.h b/Zend/zend.h index fa2323e1e..b3498a23c 100644 --- a/Zend/zend.h +++ b/Zend/zend.h @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend.h 321753 2012-01-04 08:25:06Z laruence $ */ +/* $Id: zend.h 323245 2012-02-16 01:51:45Z stas $ */ #ifndef ZEND_H #define ZEND_H @@ -531,10 +531,8 @@ typedef struct _zend_utility_functions { int (*write_function)(const char *str, uint str_length); FILE *(*fopen_function)(const char *filename, char **opened_path TSRMLS_DC); void (*message_handler)(long message, const void *data TSRMLS_DC); -#ifndef ZEND_SIGNALS void (*block_interruptions)(void); void (*unblock_interruptions)(void); -#endif int (*get_configuration_directive)(const char *name, uint name_length, zval *contents); void (*ticks_function)(int ticks); void (*on_timeout)(int seconds TSRMLS_DC); @@ -677,10 +675,8 @@ BEGIN_EXTERN_C() extern ZEND_API int (*zend_printf)(const char *format, ...) ZEND_ATTRIBUTE_PTR_FORMAT(printf, 1, 2); extern ZEND_API zend_write_func_t zend_write; extern ZEND_API FILE *(*zend_fopen)(const char *filename, char **opened_path TSRMLS_DC); -#ifndef ZEND_SIGNALS extern ZEND_API void (*zend_block_interruptions)(void); extern ZEND_API void (*zend_unblock_interruptions)(void); -#endif extern ZEND_API void (*zend_ticks_function)(int ticks); extern ZEND_API void (*zend_error_cb)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args) ZEND_ATTRIBUTE_PTR_FORMAT(printf, 4, 0); extern ZEND_API void (*zend_on_timeout)(int seconds TSRMLS_DC); diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index acfac9c17..11e6fb5ac 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_execute.c 321634 2012-01-01 13:15:04Z felipe $ */ +/* $Id: zend_execute.c 323204 2012-02-14 09:27:08Z dmitry $ */ #define ZEND_INTENSIVE_DEBUGGING 0 @@ -1512,7 +1512,12 @@ ZEND_API void execute_internal(zend_execute_data *execute_data_ptr, int return_v ZEND_API int zend_set_user_opcode_handler(zend_uchar opcode, user_opcode_handler_t handler) { if (opcode != ZEND_USER_OPCODE) { - zend_user_opcodes[opcode] = ZEND_USER_OPCODE; + if (handler == NULL) { + /* restore the original handler */ + zend_user_opcodes[opcode] = opcode; + } else { + zend_user_opcodes[opcode] = ZEND_USER_OPCODE; + } zend_user_opcode_handlers[opcode] = handler; return SUCCESS; } diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index 8859c8fd9..4f79224dd 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_execute_API.c 322922 2012-01-29 15:25:40Z derick $ */ +/* $Id: zend_execute_API.c 323120 2012-02-08 03:03:05Z laruence $ */ #include <stdio.h> #include <signal.h> @@ -1195,12 +1195,7 @@ ZEND_API int zend_eval_stringl(char *str, int str_len, zval *retval_ptr, char *s } CG(interactive) = 0; - retval = SUCCESS; - zend_try { - zend_execute(new_op_array TSRMLS_CC); - } zend_catch { - retval = FAILURE; - } zend_end_try(); + zend_execute(new_op_array TSRMLS_CC); CG(interactive) = orig_interactive; if (local_retval_ptr) { @@ -1221,6 +1216,7 @@ ZEND_API int zend_eval_stringl(char *str, int str_len, zval *retval_ptr, char *s destroy_op_array(new_op_array TSRMLS_CC); efree(new_op_array); EG(return_value_ptr_ptr) = original_return_value_ptr_ptr; + retval = SUCCESS; } else { retval = FAILURE; } |