diff options
author | Dmitry Stogov <dmitry@zend.com> | 2020-06-01 16:26:22 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2020-06-01 16:26:22 +0300 |
commit | 27066154185210e8532636612e5121423d70870f (patch) | |
tree | 17b7df100f1fffa8c8ccd40ab86b2affd56f2064 | |
parent | 520a403fcd74b31d37808e370a4958d0a5e151ff (diff) | |
download | php-git-27066154185210e8532636612e5121423d70870f.tar.gz |
Fixed retutn type inference when return undefined variable
-rw-r--r-- | ext/opcache/jit/zend_jit_trace.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index f72c87e4f7..7c2cfb5e2e 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -1469,6 +1469,10 @@ propagate_arg: } else { ZEND_ASSERT(ssa_ops[idx].op1_use >= 0); return_value_info = ssa_var_info[ssa_ops[idx].op1_use]; + if (return_value_info.type & MAY_BE_UNDEF) { + return_value_info.type &= ~MAY_BE_UNDEF; + return_value_info.type |= MAY_BE_NULL; + } return_value_info.type &= ~MAY_BE_GUARD; } break; |