Skip to content

Commit

Permalink
Fixed possible misalignment in 32-bit build.
Browse files Browse the repository at this point in the history
  • Loading branch information
dstogov committed Jun 10, 2019
1 parent 65ada39 commit 199eb2b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ext/opcache/ZendAccelerator.c
Expand Up @@ -1289,6 +1289,10 @@ static zend_persistent_script *store_script_in_file_cache(zend_persistent_script
/* Align to 64-byte boundary */
ZCG(mem) = zend_arena_alloc(&CG(arena), memory_used + 64);
ZCG(mem) = (void*)(((zend_uintptr_t)ZCG(mem) + 63L) & ~63L);
#elif ZEND_MM_ALIGNMENT < 8
/* Align to 8-byte boundary */
ZCG(mem) = zend_arena_alloc(&CG(arena), memory_used + 8);
ZCG(mem) = (void*)(((zend_uintptr_t)ZCG(mem) + 7L) & ~7L);
#else
ZCG(mem) = zend_arena_alloc(&CG(arena), memory_used);
#endif
Expand Down

0 comments on commit 199eb2b

Please sign in to comment.