Skip to content

Commit f3465e6

Browse files
committed
Minor fiber fixes
Assert error is fatal when calling zend_error_suspend_fiber. Added missing static. Removed .S extension from output of configure.
1 parent 28dbdd5 commit f3465e6

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Zend/zend_fibers.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ static bool zend_fiber_stack_allocate(zend_fiber_stack *stack, size_t size)
149149
return true;
150150
}
151151

152-
void zend_fiber_stack_free(zend_fiber_stack *stack)
152+
static void zend_fiber_stack_free(zend_fiber_stack *stack)
153153
{
154154
if (!stack->pointer) {
155155
return;
@@ -287,6 +287,7 @@ ZEND_COLD void zend_error_suspend_fiber(
287287
int orig_type, zend_string *error_filename, uint32_t error_lineno, zend_string *message)
288288
{
289289
ZEND_ASSERT(EG(current_fiber) && "Must be within an active fiber!");
290+
ZEND_ASSERT(orig_type & E_FATAL_ERRORS && "Error type must be fatal");
290291

291292
zend_error_info *error = emalloc(sizeof(zend_error_info));
292293

configure.ac

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1216,15 +1216,15 @@ AS_CASE([$fiber_cpu],
12161216
)
12171217

12181218
if test "$fiber_os" = 'mac'; then
1219-
fiber_asm_file="combined_sysv_macho_gas.S"
1219+
fiber_asm_file="combined_sysv_macho_gas"
12201220
elif test "$fiber_asm_file_prefix" != 'unknown'; then
1221-
fiber_asm_file="${fiber_asm_file_prefix}_elf_gas.S"
1221+
fiber_asm_file="${fiber_asm_file_prefix}_elf_gas"
12221222
else
12231223
fibers="no"
12241224
fi
12251225

12261226
if test "$fibers" = 'yes'; then
1227-
PHP_ADD_SOURCES(Zend/asm, make_${fiber_asm_file} jump_${fiber_asm_file})
1227+
PHP_ADD_SOURCES(Zend/asm, make_${fiber_asm_file}.S jump_${fiber_asm_file}.S)
12281228
AC_MSG_RESULT([$fiber_asm_file])
12291229
else
12301230
AC_MSG_ERROR([Unable to determine platform!])

0 commit comments

Comments
 (0)