From 0d6f35b5f03fe14bf7607114e89e4ea974b21be3 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Thu, 20 Apr 2023 15:41:50 +0200 Subject: [PATCH] Fix incorrect CG(memoize_mode) state after bailout in ??= Fixes GH-11108 --- Zend/tests/gh11108.phpt | 11 +++++++++++ Zend/tests/gh11108_shutdown.inc | 5 +++++ Zend/tests/gh11108_test.inc | 3 +++ Zend/zend.c | 1 + 4 files changed, 20 insertions(+) create mode 100644 Zend/tests/gh11108.phpt create mode 100644 Zend/tests/gh11108_shutdown.inc create mode 100644 Zend/tests/gh11108_test.inc diff --git a/Zend/tests/gh11108.phpt b/Zend/tests/gh11108.phpt new file mode 100644 index 0000000000000..efbd12dc367fa --- /dev/null +++ b/Zend/tests/gh11108.phpt @@ -0,0 +1,11 @@ +--TEST-- +GH-11108: Incorrect CG(memoize_mode) state after bailout in ??= +--FILE-- + +--EXPECTF-- +Fatal error: Cannot use [] for reading in %s on line %d diff --git a/Zend/tests/gh11108_shutdown.inc b/Zend/tests/gh11108_shutdown.inc new file mode 100644 index 0000000000000..34f8131d4a840 --- /dev/null +++ b/Zend/tests/gh11108_shutdown.inc @@ -0,0 +1,5 @@ +