diff options
| author | Stanislav Malyshev <stas@php.net> | 2019-03-05 13:25:21 -0800 |
|---|---|---|
| committer | Stanislav Malyshev <stas@php.net> | 2019-03-05 21:41:22 -0800 |
| commit | f90a1a472a67cbbcde163cca65bdc78c54ab358f (patch) | |
| tree | d80b1eaf064f6ff19f911401b7ef3e00870957df /Zend/zend_compile.h | |
| parent | 433fc322fc43e09279201bce43e0c465fc19378a (diff) | |
| download | php-git-f90a1a472a67cbbcde163cca65bdc78c54ab358f.tar.gz | |
Fix shifting signed values too far
Signed shift of 31 for int and 63 for long is flagged as undefined
behavior by UBSan (-fsanitize=undefined) and seems to be indeed so
according to the standard.
The patch converts such cases to use unsigned.
Diffstat (limited to 'Zend/zend_compile.h')
| -rw-r--r-- | Zend/zend_compile.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h index 37b1836a79..8e4e8f5ad9 100644 --- a/Zend/zend_compile.h +++ b/Zend/zend_compile.h @@ -325,7 +325,7 @@ typedef struct _zend_oparray_context { #define ZEND_ACC_DTOR (1 << 29) /* | X | | */ /* | | | */ /* op_array uses strict mode types | | | */ -#define ZEND_ACC_STRICT_TYPES (1 << 31) /* | X | | */ +#define ZEND_ACC_STRICT_TYPES (1U << 31) /* | X | | */ #define ZEND_ACC_PPP_MASK (ZEND_ACC_PUBLIC | ZEND_ACC_PROTECTED | ZEND_ACC_PRIVATE) |
