Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions ext/opcache/jit/zend_jit_trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -5070,8 +5070,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
CHECK_OP1_TRACE_TYPE();
res_info = RES_INFO();
res_use_info = zend_jit_trace_type_to_info(
STACK_MEM_TYPE(stack, EX_VAR_TO_NUM(opline->result.var)))
& (MAY_BE_UNDEF|MAY_BE_NULL|MAY_BE_FALSE|MAY_BE_TRUE|MAY_BE_LONG|MAY_BE_DOUBLE);
STACK_MEM_TYPE(stack, EX_VAR_TO_NUM(opline->result.var)));
res_addr = RES_REG_ADDR();
if (Z_MODE(res_addr) != IS_REG &&
STACK_TYPE(stack, EX_VAR_TO_NUM(opline->result.var)) !=
Expand Down
39 changes: 39 additions & 0 deletions ext/opcache/tests/jit/qm_assign_004.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
--TEST--
JIT QM_ASSIGN: 004 missing type store
--INI--
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=1M
--FILE--
<?php

function getPropertyScopes($props, $flags): array
{
$propertyScopes = [];
foreach ($props as $prop) {
$tmp = 'x'.$flags;
$propertyScopes[] = $propertyScopes[] = ($flags & 1 ? false : null) . '';
}

return $propertyScopes;
}

var_dump(getPropertyScopes(['a'], 0));
var_dump(getPropertyScopes(['a'], 0));
?>
DONE
--EXPECT--
array(2) {
[0]=>
string(0) ""
[1]=>
string(0) ""
}
array(2) {
[0]=>
string(0) ""
[1]=>
string(0) ""
}
DONE