Skip to content

Commit a3cb612

Browse files
committed
Revert "Fixed bug #97599 (coredump in set_error_handler)"
This reverts commit ccd41e0. This causes a large performance regression when notices are thrown and large arrays are in scope, see bug #79794.
1 parent 972383f commit a3cb612

File tree

2 files changed

+1
-34
lines changed

2 files changed

+1
-34
lines changed

Zend/tests/bug79599.phpt

Lines changed: 0 additions & 27 deletions
This file was deleted.

Zend/zend.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1254,10 +1254,6 @@ ZEND_API zval *zend_get_configuration_directive(zend_string *name) /* {{{ */
12541254
} \
12551255
} while (0)
12561256

1257-
static void arg_copy_ctor(zval *zv) {
1258-
zval_copy_ctor(zv);
1259-
}
1260-
12611257
static ZEND_COLD void zend_error_va_list(
12621258
int type, const char *error_filename, uint32_t error_lineno,
12631259
const char *format, va_list args)
@@ -1351,9 +1347,7 @@ static ZEND_COLD void zend_error_va_list(
13511347
if (!symbol_table) {
13521348
ZVAL_NULL(&params[4]);
13531349
} else {
1354-
array_init(&params[4]);
1355-
/* always try to do noninvasive duplication */
1356-
zend_hash_copy(Z_ARRVAL(params[4]), symbol_table, arg_copy_ctor);
1350+
ZVAL_ARR(&params[4], zend_array_dup(symbol_table));
13571351
}
13581352

13591353
ZVAL_COPY_VALUE(&orig_user_error_handler, &EG(user_error_handler));

0 commit comments

Comments
 (0)