Skip to content

Commit 893a3b4

Browse files
fix test_collect_stack_sample not running
1 parent 491a9e3 commit 893a3b4

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

profiling/src/php_ffi.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,10 @@ void ddog_php_test_free_fake_zend_function(zend_function *func) {
534534
free(func->common.function_name);
535535
free(func);
536536
}
537+
538+
// Stub for zend_flf_functions (PHP 8.4+ frameless calls) to allow tests to link
539+
// without the real PHP runtime. The test doesn't exercise frameless code paths.
540+
__attribute__((weak)) zend_function **zend_flf_functions;
537541
#endif // CFG_STACK_WALKING_TESTS || CFG_TEST
538542

539543
void *opcache_handle = NULL;

profiling/src/profiling/stack_walking.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ mod tests {
542542
}
543543

544544
#[test]
545-
#[cfg(stack_walking_tests)]
545+
#[cfg(feature = "stack_walking_tests")]
546546
fn test_collect_stack_sample() {
547547
unsafe {
548548
let fake_execute_data = zend::ddog_php_test_create_fake_zend_execute_data(3);

0 commit comments

Comments
 (0)