Skip to content

Commit 8c4c16d

Browse files
committed
Merge branch 'master' into jsond
2 parents b68da91 + 107ae86 commit 8c4c16d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+1188
-942
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@
6363
- Mcrypt:
6464
. Fixed possible read after end of buffer and use after free. (Dmitry)
6565

66+
- Opcache:
67+
. Fixed bug #68644 (strlen incorrect : mbstring + func_overload=2 +UTF-8
68+
+ Opcache). (Laruence)
69+
6670
- pcntl:
6771
. Fixed bug #60509 (pcntl_signal doesn't decrease ref-count of old handler
6872
when setting SIG_DFL). (Julien)

TSRM/TSRM.h

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
# include <tsrm_config.h>
2121
#endif
2222

23+
#include "main/php_stdint.h"
24+
2325
#ifdef TSRM_WIN32
2426
# ifdef TSRM_EXPORTS
2527
# define TSRM_API __declspec(dllexport)
@@ -32,13 +34,8 @@
3234
# define TSRM_API
3335
#endif
3436

35-
#ifdef _WIN64
36-
typedef __int64 tsrm_intptr_t;
37-
typedef unsigned __int64 tsrm_uintptr_t;
38-
#else
39-
typedef long tsrm_intptr_t;
40-
typedef unsigned long tsrm_uintptr_t;
41-
#endif
37+
typedef intptr_t tsrm_intptr_t;
38+
typedef uintptr_t tsrm_uintptr_t;
4239

4340
/* Only compile multi-threading functions if we're in ZTS mode */
4441
#ifdef ZTS

UPGRADING

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ PHP X.Y UPGRADE NOTES
5151
and heredocs means that \u{ followed by an invalid sequence will now error.
5252
However, \u without a following { is unaffected, so "\u202e" won't error and
5353
will work the same as before.
54+
. zend_function.common.num_args don't include the variadic argument anymore.
5455

5556
- DBA
5657
. dba_delete() now returns false if the key was not found for the inifile

Zend/acinclude.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ AC_DEFUN([LIBZEND_BISON_CHECK],[
99
# non-working versions, e.g. "3.0 3.2";
1010
# remove "none" when introducing the first incompatible bison version an
1111
# separate any following additions by spaces
12-
bison_version_exclude="3.0"
12+
bison_version_exclude=""
1313
1414
# for standalone build of Zend Engine
1515
test -z "$SED" && SED=sed

Zend/zend.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ static ZEND_INI_MH(OnUpdateScriptEncoding) /* {{{ */
9595
if (!zend_multibyte_get_functions()) {
9696
return SUCCESS;
9797
}
98-
return zend_multibyte_set_script_encoding_by_string(new_value->val, new_value->len);
98+
return zend_multibyte_set_script_encoding_by_string(new_value ? new_value->val : NULL, new_value ? new_value->len : 0);
9999
}
100100
/* }}} */
101101

Zend/zend_API.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2206,6 +2206,8 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_functio
22062206
}
22072207
if (ptr->arg_info[ptr->num_args].is_variadic) {
22082208
internal_function->fn_flags |= ZEND_ACC_VARIADIC;
2209+
/* Don't count the variadic argument */
2210+
internal_function->num_args--;
22092211
}
22102212
} else {
22112213
internal_function->arg_info = NULL;
@@ -2760,6 +2762,8 @@ ZEND_API int zend_disable_function(char *function_name, size_t function_name_len
27602762
{
27612763
zend_internal_function *func;
27622764
if ((func = zend_hash_str_find_ptr(CG(function_table), function_name, function_name_length))) {
2765+
func->fn_flags &= ~(ZEND_ACC_VARIADIC | ZEND_ACC_HAS_TYPE_HINTS);
2766+
func->num_args = 0;
27632767
func->arg_info = NULL;
27642768
func->handler = ZEND_FN(display_disabled_function);
27652769
return SUCCESS;
@@ -2986,8 +2990,7 @@ static int zend_is_callable_check_func(int check_flags, zval *callable, zend_fca
29862990
return 0;
29872991
}
29882992

2989-
lmname = zend_string_alloc(mlen, 0);
2990-
zend_str_tolower_copy(lmname->val, mname->val, mlen);
2993+
lmname = zend_string_tolower(mname);
29912994
if (strict_class &&
29922995
fcc->calling_scope &&
29932996
zend_string_equals_literal(lmname, ZEND_CONSTRUCTOR_FUNC_NAME)) {
@@ -3152,7 +3155,7 @@ static int zend_is_callable_check_func(int check_flags, zval *callable, zend_fca
31523155
if (error) zend_spprintf(error, 0, "function '%s' does not exist", mname->val);
31533156
}
31543157
}
3155-
zend_string_free(lmname);
3158+
zend_string_release(lmname);
31563159
zend_string_release(mname);
31573160

31583161
if (fcc->object) {

Zend/zend_API.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -610,8 +610,8 @@ END_EXTERN_C()
610610
#define RETVAL_RES(r) ZVAL_RES(return_value, r)
611611
#define RETVAL_OBJ(r) ZVAL_OBJ(return_value, r)
612612
#define RETVAL_ZVAL(zv, copy, dtor) ZVAL_ZVAL(return_value, zv, copy, dtor)
613-
#define RETVAL_FALSE ZVAL_BOOL(return_value, 0)
614-
#define RETVAL_TRUE ZVAL_BOOL(return_value, 1)
613+
#define RETVAL_FALSE ZVAL_FALSE(return_value)
614+
#define RETVAL_TRUE ZVAL_TRUE(return_value)
615615

616616
#define RETURN_BOOL(b) { RETVAL_BOOL(b); return; }
617617
#define RETURN_NULL() { RETVAL_NULL(); return;}

Zend/zend_ast.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,14 +262,14 @@ ZEND_API void zend_ast_evaluate(zval *result, zend_ast *ast, zend_class_entry *s
262262
ZVAL_BOOL(result, zend_is_true(&op2));
263263
zval_dtor(&op2);
264264
} else {
265-
ZVAL_BOOL(result, 0);
265+
ZVAL_FALSE(result);
266266
}
267267
zval_dtor(&op1);
268268
break;
269269
case ZEND_AST_OR:
270270
zend_ast_evaluate(&op1, ast->child[0], scope);
271271
if (zend_is_true(&op1)) {
272-
ZVAL_BOOL(result, 1);
272+
ZVAL_TRUE(result);
273273
} else {
274274
zend_ast_evaluate(&op2, ast->child[1], scope);
275275
ZVAL_BOOL(result, zend_is_true(&op2));

0 commit comments

Comments
 (0)