Skip to content

Commit 199eb2b

Browse files
committed
Fixed possible misalignment in 32-bit build.
1 parent 65ada39 commit 199eb2b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ext/opcache/ZendAccelerator.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1289,6 +1289,10 @@ static zend_persistent_script *store_script_in_file_cache(zend_persistent_script
12891289
/* Align to 64-byte boundary */
12901290
ZCG(mem) = zend_arena_alloc(&CG(arena), memory_used + 64);
12911291
ZCG(mem) = (void*)(((zend_uintptr_t)ZCG(mem) + 63L) & ~63L);
1292+
#elif ZEND_MM_ALIGNMENT < 8
1293+
/* Align to 8-byte boundary */
1294+
ZCG(mem) = zend_arena_alloc(&CG(arena), memory_used + 8);
1295+
ZCG(mem) = (void*)(((zend_uintptr_t)ZCG(mem) + 7L) & ~7L);
12921296
#else
12931297
ZCG(mem) = zend_arena_alloc(&CG(arena), memory_used);
12941298
#endif

0 commit comments

Comments
 (0)