summaryrefslogtreecommitdiffstats
path: root/php-bug77287.patch
diff options
context:
space:
mode:
Diffstat (limited to 'php-bug77287.patch')
-rw-r--r--php-bug77287.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/php-bug77287.patch b/php-bug77287.patch
new file mode 100644
index 0000000..4df20d6
--- /dev/null
+++ b/php-bug77287.patch
@@ -0,0 +1,38 @@
+From 76760901fabf8ff53c8dfb4ddf7ca703c5a12b79 Mon Sep 17 00:00:00 2001
+From: Nikita Popov <nikita.ppv@gmail.com>
+Date: Tue, 22 Jan 2019 12:15:06 +0100
+Subject: [PATCH] Fixed bug #77287
+
+There may be an EXT_NOP opcode before the parameter list, we should
+skip over it.
+---
+ NEWS | 2 ++
+ ext/opcache/Optimizer/compact_literals.c | 2 +-
+ 2 files changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/NEWS b/NEWS
+index 6265b1736c6d..656e4ab70eaa 100644
+--- a/NEWS
++++ b/NEWS
+@@ -61,6 +61,8 @@ PHP NEWS
+ (Nikita)
+ . Fixed bug #77361 (configure fails on 64-bit AIX when opcache enabled).
+ (Kevin Adler)
++ . Fixed bug #77287 (Opcache literal compaction is incompatible with EXT
++ opcodes). (Nikita)
+
+ - PCRE:
+ . Fixed bug #77338 (get_browser with empty string). (Nikita)
+diff --git a/ext/opcache/Optimizer/compact_literals.c b/ext/opcache/Optimizer/compact_literals.c
+index 10bdf540118e..fdab0068a4d5 100644
+--- a/ext/opcache/Optimizer/compact_literals.c
++++ b/ext/opcache/Optimizer/compact_literals.c
+@@ -810,7 +810,7 @@ void zend_optimizer_compact_literals(zend_op_array *op_array, zend_optimizer_ctx
+ Z_CACHE_SLOT_P(val) = op_array->cache_size;
+ op_array->cache_size += sizeof(zval);
+ }
+- } else if (opline->opcode != ZEND_RECV) {
++ } else if (opline->opcode != ZEND_RECV && opline->opcode != ZEND_EXT_NOP) {
+ break;
+ }
+ opline++;