Skip to content
Closed
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
4 changes: 0 additions & 4 deletions Zend/zend_vm_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -3727,10 +3727,6 @@ ZEND_VM_HANDLER(113, ZEND_INIT_STATIC_METHOD_CALL, UNUSED|CLASS_FETCH|CONST|VAR,
OP2_TYPE == IS_CONST &&
EXPECTED((fbc = CACHED_PTR(opline->result.num + sizeof(void*))) != NULL)) {
/* nothing to do */
} else if (OP1_TYPE != IS_CONST &&
OP2_TYPE == IS_CONST &&
EXPECTED(CACHED_PTR(opline->result.num) == ce)) {
fbc = CACHED_PTR(opline->result.num + sizeof(void*));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you look at the implementation of CACHED_PTR:

#define CACHED_PTR(num) \
	((void**)((char*)EX(run_time_cache) + (num)))[0]

As you can see, num is used as an byte offset into EX(run_time_cache). That's why we add sizeof(void*) instead of 1, we want to load the next pointer after the one pointed to by opline->result.num.

} else if (OP2_TYPE != IS_UNUSED) {
function_name = GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R);
if (OP2_TYPE != IS_CONST) {
Expand Down
48 changes: 0 additions & 48 deletions Zend/zend_vm_execute.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading