diff options
author | Dmitry Stogov <dmitry@zend.com> | 2019-06-10 12:51:59 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2019-06-10 12:51:59 +0300 |
commit | 199eb2b110aa57c423bada077f6c9e71c5d17daf (patch) | |
tree | eb39160167688467ab634dbdb3dd9c6a15c364aa | |
parent | 65ada393602ad6125928c33a5c18dd05c84c29fa (diff) | |
download | php-git-199eb2b110aa57c423bada077f6c9e71c5d17daf.tar.gz |
Fixed possible misalignment in 32-bit build.
-rw-r--r-- | ext/opcache/ZendAccelerator.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 257f9b43f4..b57d446df5 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -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 |