diff options
author | Dmitry Stogov <dmitry@zend.com> | 2015-08-31 13:56:42 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2015-08-31 13:56:42 +0300 |
commit | 89aa1b73929d3a02d4e0bae6edf76e6b325ce8f9 (patch) | |
tree | c24d82df8672666e65c9ea41153d1016f3e61269 /ext/opcache/zend_shared_alloc.h | |
parent | 37f0c6b5cb4f8ad01651b3ea80712f6a8b6f2ea0 (diff) | |
download | php-git-89aa1b73929d3a02d4e0bae6edf76e6b325ce8f9.tar.gz |
Ensure proper data alignment
Diffstat (limited to 'ext/opcache/zend_shared_alloc.h')
-rw-r--r-- | ext/opcache/zend_shared_alloc.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/opcache/zend_shared_alloc.h b/ext/opcache/zend_shared_alloc.h index 63947169b4..398b64f432 100644 --- a/ext/opcache/zend_shared_alloc.h +++ b/ext/opcache/zend_shared_alloc.h @@ -134,13 +134,13 @@ typedef union _align_test { } align_test; #if ZEND_GCC_VERSION >= 2000 -# define PLATFORM_ALIGNMENT (__alignof__ (align_test)) +# define PLATFORM_ALIGNMENT (__alignof__(align_test) < 8 ? 8 : __alignof__(align_test)) #else # define PLATFORM_ALIGNMENT (sizeof(align_test)) #endif #define ZEND_ALIGNED_SIZE(size) \ - ((size + PLATFORM_ALIGNMENT - 1) & ~(PLATFORM_ALIGNMENT - 1)) + ZEND_MM_ALIGNED_SIZE_EX(size, PLATFORM_ALIGNMENT) /* exclusive locking */ void zend_shared_alloc_lock(void); |