diff options
author | Stanislav Malyshev <stas@php.net> | 2019-03-05 13:25:21 -0800 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2019-03-06 00:50:09 -0800 |
commit | db777e9199a94f95416ea16baf82a7d10a0bbe51 (patch) | |
tree | dddcdc2fc9fa6bc55c68cbfa15e921651c16d216 /Zend/zend_cpuinfo.h | |
parent | f651397b1f874a09a7d3885a7463cdf8ea6eafa7 (diff) | |
download | php-git-db777e9199a94f95416ea16baf82a7d10a0bbe51.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_cpuinfo.h')
-rw-r--r-- | Zend/zend_cpuinfo.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Zend/zend_cpuinfo.h b/Zend/zend_cpuinfo.h index 36e14ba556..942f92c713 100644 --- a/Zend/zend_cpuinfo.h +++ b/Zend/zend_cpuinfo.h @@ -22,7 +22,7 @@ #include "zend.h" #define ZEND_CPU_EBX_MASK (1<<30) -#define ZEND_CPU_EDX_MASK (1<<31) +#define ZEND_CPU_EDX_MASK (1U<<31) typedef enum _zend_cpu_feature { /* ECX */ |