summaryrefslogtreecommitdiffstats
path: root/eio-php83.patch
blob: 522897ca08f7c6ce44dd5bc3ac1a5fe23f88771b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
diff --git a/php8/php_eio.c b/php8/php_eio.c
index e79d10f..c87ca82 100644
--- a/php8/php_eio.c
+++ b/php8/php_eio.c
@@ -479,6 +479,10 @@ static void php_eio_custom_execute(eio_req *req)
 			ZVAL_NULL(&zarg);
 		}
 
+#ifdef ZEND_CHECK_STACK_LIMIT
+		zend_call_stack_init();
+#endif
+
 		zend_call_method(Z_ISUNDEF(pf->obj) ? NULL : Z_OBJ_P(&pf->obj), pf->ce, &pf->func_ptr,
 				ZSTR_VAL(pf->func_ptr->common.function_name),
 				ZSTR_LEN(pf->func_ptr->common.function_name),
@@ -863,8 +867,11 @@ static inline void php_eio_init()
 	pid_t cur_pid = getpid();
 
 	if (php_eio_pid <= 0 || (php_eio_pid > 0 && cur_pid != php_eio_pid)) {
-		/* Uninitialized or forked a process(which needs it's own eio pipe) */
+#ifdef ZEND_CHECK_STACK_LIMIT
+		zend_call_stack_init();
+#endif
 
+		/* Uninitialized or forked a process(which needs it's own eio pipe) */
 		if (php_eio_pipe_new()) {
 			php_error_docref(NULL, E_ERROR,
 					"Failed creating internal pipe: %s", strerror(errno));