]> granicus.if.org Git - php/commitdiff
Properly cleanup in case of abort because too many functions in single trace.
authorDmitry Stogov <dmitry@zend.com>
Mon, 27 Jul 2020 13:37:15 +0000 (16:37 +0300)
committerDmitry Stogov <dmitry@zend.com>
Mon, 27 Jul 2020 13:37:15 +0000 (16:37 +0300)
ext/opcache/jit/zend_jit_trace.c

index 8af466c9e446c9d18a9bbb50fedb5f8dd13688f3..7ed9730320739226b11a10b4078e57f3b4e2aca1 100644 (file)
@@ -1009,6 +1009,7 @@ static zend_ssa *zend_jit_trace_build_tssa(zend_jit_trace_rec *trace_buffer, uin
                                /* pass */
                        } else if (num_op_arrays == ZEND_JIT_TRACE_MAX_FUNCS) {
                                /* Too many functions in single trace */
+                               *num_op_arrays_ptr = num_op_arrays;
                                return NULL;
                        } else {
                                /* Remember op_array to cleanup */
@@ -1026,6 +1027,7 @@ static zend_ssa *zend_jit_trace_build_tssa(zend_jit_trace_rec *trace_buffer, uin
                                        /* pass */
                                } else if (num_op_arrays == ZEND_JIT_TRACE_MAX_FUNCS) {
                                        /* Too many functions in single trace */
+                                       *num_op_arrays_ptr = num_op_arrays;
                                        return NULL;
                                } else {
                                        /* Remember op_array to cleanup */