Skip to content

Commit ff74acc

Browse files
committed
ext/opcache/jit/zend_jit_trace: do not reset stack_map of unallocated traces
Clearing stack_map is pointless if ZEND_JIT_TRACE_NUM was not incremented.
1 parent 39b092b commit ff74acc

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

ext/opcache/jit/zend_jit_trace.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7096,7 +7096,6 @@ static zend_jit_trace_stop zend_jit_compile_root_trace(zend_jit_trace_rec *trace
70967096
if (!shared_exit_info) {
70977097
if (t->stack_map) {
70987098
efree(t->stack_map);
7099-
t->stack_map = NULL;
71007099
}
71017100
ret = ZEND_JIT_TRACE_STOP_NO_SHM;
71027101
goto exit;
@@ -7130,13 +7129,11 @@ static zend_jit_trace_stop zend_jit_compile_root_trace(zend_jit_trace_rec *trace
71307129
ZEND_JIT_EXIT_COUNTERS + t->exit_count >= JIT_G(max_exit_counters)) {
71317130
if (t->stack_map) {
71327131
efree(t->stack_map);
7133-
t->stack_map = NULL;
71347132
}
71357133
ret = ZEND_JIT_TRACE_STOP_TOO_MANY_EXITS;
71367134
} else {
71377135
if (t->stack_map) {
71387136
efree(t->stack_map);
7139-
t->stack_map = NULL;
71407137
}
71417138
ret = ZEND_JIT_TRACE_STOP_COMPILER_ERROR;
71427139
}
@@ -7828,7 +7825,6 @@ static zend_jit_trace_stop zend_jit_compile_side_trace(zend_jit_trace_rec *trace
78287825
if (!shared_exit_info) {
78297826
if (t->stack_map) {
78307827
efree(t->stack_map);
7831-
t->stack_map = NULL;
78327828
}
78337829
ret = ZEND_JIT_TRACE_STOP_NO_SHM;
78347830
goto exit;
@@ -7869,13 +7865,11 @@ static zend_jit_trace_stop zend_jit_compile_side_trace(zend_jit_trace_rec *trace
78697865
ZEND_JIT_EXIT_COUNTERS + t->exit_count >= JIT_G(max_exit_counters)) {
78707866
if (t->stack_map) {
78717867
efree(t->stack_map);
7872-
t->stack_map = NULL;
78737868
}
78747869
ret = ZEND_JIT_TRACE_STOP_TOO_MANY_EXITS;
78757870
} else {
78767871
if (t->stack_map) {
78777872
efree(t->stack_map);
7878-
t->stack_map = NULL;
78797873
}
78807874
ret = ZEND_JIT_TRACE_STOP_COMPILER_ERROR;
78817875
}

0 commit comments

Comments
 (0)