Skip to content

Commit a0749fe

Browse files
committed
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2: Fixed possible misalignment in 32-bit build.
2 parents 53b0f4b + 199eb2b commit a0749fe

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
@@ -1383,6 +1383,10 @@ static zend_persistent_script *store_script_in_file_cache(zend_persistent_script
13831383
/* Align to 64-byte boundary */
13841384
ZCG(mem) = zend_arena_alloc(&CG(arena), memory_used + 64);
13851385
ZCG(mem) = (void*)(((zend_uintptr_t)ZCG(mem) + 63L) & ~63L);
1386+
#elif ZEND_MM_ALIGNMENT < 8
1387+
/* Align to 8-byte boundary */
1388+
ZCG(mem) = zend_arena_alloc(&CG(arena), memory_used + 8);
1389+
ZCG(mem) = (void*)(((zend_uintptr_t)ZCG(mem) + 7L) & ~7L);
13861390
#else
13871391
ZCG(mem) = zend_arena_alloc(&CG(arena), memory_used);
13881392
#endif

0 commit comments

Comments
 (0)