summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXinchen Hui <laruence@gmail.com>2016-08-18 15:37:39 +0800
committerXinchen Hui <laruence@gmail.com>2016-08-18 15:37:39 +0800
commit66a527b8c1942cae140c5dab5f3eff2e33ca9740 (patch)
tree0e0715a4be8bc5f0e67737908d205fdc1654adc4
parenta3740dadecec9d47cde6055996e2ca13dd10c4f6 (diff)
downloadphp-git-66a527b8c1942cae140c5dab5f3eff2e33ca9740.tar.gz
Fixed segfault introduced in 447e57a1e12cdcc6791302d5097119fb2165475a
-rw-r--r--ext/opcache/Optimizer/zend_inference.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/opcache/Optimizer/zend_inference.c b/ext/opcache/Optimizer/zend_inference.c
index e3bf922a9f..174528f2e1 100644
--- a/ext/opcache/Optimizer/zend_inference.c
+++ b/ext/opcache/Optimizer/zend_inference.c
@@ -3695,14 +3695,14 @@ static zend_bool can_convert_to_double(
static int zend_type_narrowing(const zend_op_array *op_array, const zend_script *script, zend_ssa *ssa)
{
uint32_t bitset_len = zend_bitset_len(ssa->vars_count);
- zend_bitset visited = 0;
- zend_bitset worklist = visited + bitset_len;
+ zend_bitset visited, worklist;
int i, v;
zend_op *opline;
zend_bool narrowed = 0;
ALLOCA_FLAG(use_heap)
visited = ZEND_BITSET_ALLOCA(2 * bitset_len, use_heap);
+ worklist = visited + bitset_len;
zend_bitset_clear(worklist, bitset_len);