summaryrefslogtreecommitdiff
path: root/Zend/zend_compile.h
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2019-03-05 13:25:21 -0800
committerStanislav Malyshev <stas@php.net>2019-03-06 00:50:09 -0800
commitdb777e9199a94f95416ea16baf82a7d10a0bbe51 (patch)
treedddcdc2fc9fa6bc55c68cbfa15e921651c16d216 /Zend/zend_compile.h
parentf651397b1f874a09a7d3885a7463cdf8ea6eafa7 (diff)
downloadphp-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_compile.h')
-rw-r--r--Zend/zend_compile.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h
index 1fff90a1ee..82d70fd4b0 100644
--- a/Zend/zend_compile.h
+++ b/Zend/zend_compile.h
@@ -329,7 +329,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)