]> granicus.if.org Git - php/commitdiff
Fixed missaligned access
authorDmitry Stogov <dmitry@zend.com>
Mon, 9 Nov 2020 08:50:26 +0000 (11:50 +0300)
committerDmitry Stogov <dmitry@zend.com>
Mon, 9 Nov 2020 08:50:26 +0000 (11:50 +0300)
ext/opcache/jit/zend_jit_trace.c

index 14826ee69bbaa97600054635b30e4f3cf4ba2dc6..c13ba1d48549d2111569235a6ed9ec3ea80d2ff0 100644 (file)
@@ -422,9 +422,9 @@ static zend_always_inline void zend_jit_trace_add_op_guard(zend_ssa
 static zend_always_inline size_t zend_jit_trace_frame_size(const zend_op_array *op_array)
 {
        if (op_array && op_array->type == ZEND_USER_FUNCTION) {
-               return offsetof(zend_jit_trace_stack_frame, stack) + ZEND_MM_ALIGNED_SIZE((op_array->last_var + op_array->T) * sizeof(zend_jit_trace_stack));
+               return ZEND_MM_ALIGNED_SIZE(offsetof(zend_jit_trace_stack_frame, stack) + ZEND_MM_ALIGNED_SIZE((op_array->last_var + op_array->T) * sizeof(zend_jit_trace_stack)));
        } else {
-               return offsetof(zend_jit_trace_stack_frame, stack);
+               return ZEND_MM_ALIGNED_SIZE(offsetof(zend_jit_trace_stack_frame, stack));
        }
 }