mirror of
https://github.com/php/php-src.git
synced 2024-12-16 21:37:49 +08:00
Merge branch 'PHP-8.2'
* PHP-8.2: Fix incorrect CG(memoize_mode) state after bailout in ??=
This commit is contained in:
commit
6ca6b46234
11
Zend/tests/gh11108.phpt
Normal file
11
Zend/tests/gh11108.phpt
Normal file
@ -0,0 +1,11 @@
|
||||
--TEST--
|
||||
GH-11108: Incorrect CG(memoize_mode) state after bailout in ??=
|
||||
--FILE--
|
||||
<?php
|
||||
register_shutdown_function(function() {
|
||||
include __DIR__ . '/gh11108_shutdown.inc';
|
||||
});
|
||||
include __DIR__ . '/gh11108_test.inc';
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Cannot use [] for reading in %s on line %d
|
5
Zend/tests/gh11108_shutdown.inc
Normal file
5
Zend/tests/gh11108_shutdown.inc
Normal file
@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
function test() {
|
||||
throw new Exception();
|
||||
}
|
3
Zend/tests/gh11108_test.inc
Normal file
3
Zend/tests/gh11108_test.inc
Normal file
@ -0,0 +1,3 @@
|
||||
<?php
|
||||
|
||||
$messageList[] ??= true;
|
@ -1190,6 +1190,7 @@ ZEND_API ZEND_COLD ZEND_NORETURN void _zend_bailout(const char *filename, uint32
|
||||
CG(unclean_shutdown) = 1;
|
||||
CG(active_class_entry) = NULL;
|
||||
CG(in_compilation) = 0;
|
||||
CG(memoize_mode) = 0;
|
||||
EG(current_execute_data) = NULL;
|
||||
LONGJMP(*EG(bailout), FAILURE);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user