summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2019-06-10 12:52:50 +0300
committerDmitry Stogov <dmitry@zend.com>2019-06-10 12:52:50 +0300
commita0749fe483c7682c9b6d9bbc6f6ff9ed4c2e1394 (patch)
tree034340019b6682e615257236d667db1e68339dbe
parent53b0f4ba4ed15f87778b2c49478f2d79fa946713 (diff)
parent199eb2b110aa57c423bada077f6c9e71c5d17daf (diff)
downloadphp-git-a0749fe483c7682c9b6d9bbc6f6ff9ed4c2e1394.tar.gz
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2: Fixed possible misalignment in 32-bit build.
-rw-r--r--ext/opcache/ZendAccelerator.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c
index de5175ebbe..291cb828f2 100644
--- a/ext/opcache/ZendAccelerator.c
+++ b/ext/opcache/ZendAccelerator.c
@@ -1383,6 +1383,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