Skip to content

Commit 13cff19

Browse files
committed
#50: * fix AddressSanitizer stack issue for char vm_stack_memory[ZEND_FIBER_VM_STACK_SIZE] visibility
1 parent 843720b commit 13cff19

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

run-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ else
1616
TEST_PATH="$BASE_PATH/$1"
1717
fi
1818

19-
"$PHP_EXECUTABLE" "$RUN_TESTS_PATH" --show-diff -m -p "$PHP_EXECUTABLE" "$TEST_PATH"
19+
"$PHP_EXECUTABLE" "$RUN_TESTS_PATH" --show-diff -p "$PHP_EXECUTABLE" "$TEST_PATH"

scheduler.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1220,10 +1220,11 @@ ZEND_STACK_ALIGNED void fiber_entry(zend_fiber_transfer *transfer)
12201220

12211221
const bool is_scheduler = &coroutine->coroutine == ZEND_ASYNC_SCHEDULER;
12221222

1223+
// Allocate VM stack on C stack instead of heap
1224+
char vm_stack_memory[ZEND_FIBER_VM_STACK_SIZE];
1225+
12231226
zend_first_try
12241227
{
1225-
// Allocate VM stack on C stack instead of heap
1226-
char vm_stack_memory[ZEND_FIBER_VM_STACK_SIZE];
12271228
zend_vm_stack stack = (zend_vm_stack)vm_stack_memory;
12281229

12291230
// Initialize VM stack structure manually

0 commit comments

Comments
 (0)