Skip to content
Merged
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
8 changes: 7 additions & 1 deletion profiling/src/php_ffi.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
#include <dlfcn.h> // for dlsym
#endif

#if PHP_VERSION_ID >= 70400 && PHP_VERSION_ID < 80400
// todo: not all things are fixed upstream yet e.g. ZEND_INIT_ARRAY
#if PHP_VERSION_ID >= 70400
#define CFG_NEED_OPCODE_HANDLERS 1
#else
#define CFG_NEED_OPCODE_HANDLERS 0
Expand Down Expand Up @@ -168,6 +169,11 @@ static void ddog_php_prof_install_opcode_handlers(uint32_t php_version_id) {
zend_set_user_opcode_handler(ZEND_FUNC_GET_ARGS, dispatch_handler);
}
#endif

// this is not yet patched upstream
if (zend_get_user_opcode_handler(ZEND_INIT_ARRAY) == NULL) {
zend_set_user_opcode_handler(ZEND_INIT_ARRAY, dispatch_handler);
}
}
#endif

Expand Down
Loading