Skip to content

Instantly share code, notes, and snippets.

Dmitry Stogov dstogov

Block or report user

Report or block dstogov

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View throw_in_ffi_callbac.diff
diff --git a/ext/ffi/ffi.c b/ext/ffi/ffi.c
index f43ba2adc8..2a8e213280 100644
--- a/ext/ffi/ffi.c
+++ b/ext/ffi/ffi.c
@@ -877,6 +877,11 @@ static void zend_ffi_callback_trampoline(ffi_cif* cif, void* ret, void** args, v
}
free_alloca(fci.params, use_heap);
+ if (EG(exception)) {
+ zend_error(E_WARNING, "Uncaught %s in PHP FFI callback", ZSTR_VAL(EG(exception)->ce->name));
View bug79094.diff
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c
index e1001062e5..005a877126 100644
--- a/Zend/zend_execute_API.c
+++ b/Zend/zend_execute_API.c
@@ -527,10 +527,18 @@ ZEND_API uint32_t zend_get_executed_lineno(void) /* {{{ */
ex = ex->prev_execute_data;
}
if (ex) {
- if (EG(exception) && ex->opline->opcode == ZEND_HANDLE_EXCEPTION &&
+ if (EG(exception)
View db2_bind_param.diff
diff --git a/ext/opcache/Optimizer/zend_optimizer.c b/ext/opcache/Optimizer/zend_optimizer.c
index 957b977dd6..5d5ecc78be 100644
--- a/ext/opcache/Optimizer/zend_optimizer.c
+++ b/ext/opcache/Optimizer/zend_optimizer.c
@@ -684,6 +684,8 @@ uint32_t zend_optimizer_classify_function(zend_string *name, uint32_t num_args)
return ZEND_FUNC_INDIRECT_VAR_ACCESS;
} else if (zend_string_equals_literal(name, "assert")) {
return ZEND_FUNC_INDIRECT_VAR_ACCESS;
+ } else if (zend_string_equals_literal(name, "db2_bind_param")) {
+ return ZEND_FUNC_INDIRECT_VAR_ACCESS;
View bug78903-02.diff
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index 8feb13955d..f3931c1a90 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -5924,8 +5924,15 @@ static void zend_begin_func_decl(znode *result, zend_op_array *op_array, zend_as
return;
}
- key = zend_build_runtime_definition_key(lcname, decl->lex_pos);
- zend_hash_update_ptr(CG(function_table), key, op_array);
View bug78903.diff
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index b6a120c94b..5ba10b794c 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -5917,7 +5917,7 @@ static void zend_begin_func_decl(znode *result, zend_op_array *op_array, zend_as
return;
}
- key = zend_build_runtime_definition_key(lcname, decl->lex_pos);
+ key = zend_build_runtime_definition_key(lcname, (unsigned char*)(decl->lex_pos - LANG_SCNG(yy_start)));
View preload_alias-02.diff
diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index 3493a241a6..21d2c964e8 100644
--- a/Zend/zend_API.c
+++ b/Zend/zend_API.c
@@ -2762,6 +2762,7 @@ ZEND_API zend_class_entry *zend_register_internal_interface(zend_class_entry *or
ZEND_API int zend_register_class_alias_ex(const char *name, size_t name_len, zend_class_entry *ce, int persistent) /* {{{ */
{
zend_string *lcname;
+ zval zv, *ret;
View class_alias-02.diff
diff --git a/ext/opcache/zend_persist.c b/ext/opcache/zend_persist.c
index 1571093419..bcbd2f270f 100644
--- a/ext/opcache/zend_persist.c
+++ b/ext/opcache/zend_persist.c
@@ -700,6 +700,12 @@ static void zend_persist_class_entry(zval *zv)
zend_class_entry *ce = Z_PTR_P(zv);
if (ce->type == ZEND_USER_CLASS) {
+ /* The same zend_class_entry may be reused by class_alias */
+ zend_class_entry *new_ce = zend_shared_alloc_get_xlat_entry(ce);
View class_alias.diff
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c
index d3bf032c10..6f496bb4cd 100644
--- a/Zend/zend_builtin_functions.c
+++ b/Zend/zend_builtin_functions.c
@@ -1553,6 +1553,11 @@ ZEND_FUNCTION(class_alias)
return;
}
+ if (CG(compiler_options) & ZEND_COMPILE_PRELOAD) {
+ zend_error_noreturn(E_ERROR, "class_alias() is not supported in preloading scenarios");
View bug78895.diff
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index d669ff6da2..f36e44148f 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -4581,6 +4581,11 @@ ZEND_METHOD(reflection_class, getModifiers)
}
GET_REFLECTION_OBJECT_PTR(ce);
+ if (ce->ce_flags & (ZEND_ACC_INTERFACE|ZEND_ACC_TRAIT|ZEND_ACC_EXPLICIT_ABSTRACT_CLASS)) {
+ /* Don't keep "implicit" flag if not necessary */
View closure.diff
diff --git a/Zend/zend_closures.c b/Zend/zend_closures.c
index 23ea9bc2e2..aa80d0a8c5 100644
--- a/Zend/zend_closures.c
+++ b/Zend/zend_closures.c
@@ -226,6 +226,21 @@ ZEND_METHOD(Closure, bind)
}
/* }}} */
+static ZEND_NAMED_FUNCTION(zend_closure_call_invoke) /* {{{ */
+{
You can’t perform that action at this time.