From c5b42be40e98f1626e2404af069af16cb6510ef3 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Wed, 9 Sep 2020 11:09:20 +0300 Subject: [PATCH] Fixed memory leak --- ext/opcache/jit/zend_jit_x86.dasc | 1 + ext/opcache/tests/jit/assign_dim_op_001.phpt | 21 ++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 ext/opcache/tests/jit/assign_dim_op_001.phpt diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index 6b1f6cf5349..39244195603 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -6274,6 +6274,7 @@ static int zend_jit_assign_dim_op(dasm_State **Dst, const zend_op *opline, uint3 } |9: + | FREE_OP opline->op2_type, opline->op2, op2_info, 0, opline return 1; } diff --git a/ext/opcache/tests/jit/assign_dim_op_001.phpt b/ext/opcache/tests/jit/assign_dim_op_001.phpt new file mode 100644 index 00000000000..256a6d5425c --- /dev/null +++ b/ext/opcache/tests/jit/assign_dim_op_001.phpt @@ -0,0 +1,21 @@ +--TEST-- +JIT ASSIGN_DIM_OP: 001 +--INI-- +opcache.enable=1 +opcache.enable_cli=1 +opcache.file_update_protection=0 +opcache.jit_buffer_size=1M +--SKIPIF-- + +--FILE-- + +--EXPECT-- +array(1) { + ["ab"]=> + int(2) +}