summaryrefslogtreecommitdiff
path: root/Zend/zend_gc.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-06-19 12:47:56 +0200
committerNikita Popov <nikita.ppv@gmail.com>2019-06-19 15:09:00 +0200
commit3d4298697b41231690f93590e99f599b964f6a0d (patch)
tree1f1352e4fe704d8de544d795ef16e923afc06d8c /Zend/zend_gc.c
parent11f30d67ea058554cb6d16fb67c7708070f78d47 (diff)
downloadphp-git-3d4298697b41231690f93590e99f599b964f6a0d.tar.gz
Fix shift UB in constants
We were shifting out the top bit of a signed integer.
Diffstat (limited to 'Zend/zend_gc.c')
-rw-r--r--Zend/zend_gc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/Zend/zend_gc.c b/Zend/zend_gc.c
index 7ed3078ed1..a5eb711f31 100644
--- a/Zend/zend_gc.c
+++ b/Zend/zend_gc.c
@@ -78,13 +78,13 @@
#endif
/* GC_INFO layout */
-#define GC_ADDRESS 0x0fffff
-#define GC_COLOR 0x300000
+#define GC_ADDRESS 0x0fffffu
+#define GC_COLOR 0x300000u
-#define GC_BLACK 0x000000 /* must be zero */
-#define GC_WHITE 0x100000
-#define GC_GREY 0x200000
-#define GC_PURPLE 0x300000
+#define GC_BLACK 0x000000u /* must be zero */
+#define GC_WHITE 0x100000u
+#define GC_GREY 0x200000u
+#define GC_PURPLE 0x300000u
/* GC_INFO access */
#define GC_REF_ADDRESS(ref) \