Skip to content

Commit ee10c37

Browse files
committed
Skip external-reap test under ASAN: child exit too slow for race
Under ASAN, child process exit takes much longer due to leak checking. The 200ms usleep is not enough for the child to become a zombie, so pcntl_waitpid returns 0 and the external reap scenario never triggers.
1 parent 08a673a commit ee10c37

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

tests/exec/013-proc_close_child_already_reaped.phpt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ if (!function_exists("proc_open")) echo "skip proc_open() is not available";
66
if (DIRECTORY_SEPARATOR === '\\') die('skip Unix-only test');
77
$php = getenv('TEST_PHP_EXECUTABLE');
88
if ($php === false) echo "skip no php executable defined";
9+
// Under ASAN, child process exit(42) takes much longer due to leak checking,
10+
// so usleep(200ms) is not enough for the child to become a zombie.
11+
// pcntl_waitpid returns 0 (still running) and the external reap never happens.
12+
if (getenv('USE_ZEND_ALLOC') === '0') die('skip ASAN slows child exit, making race condition unreliable');
913
?>
1014
--FILE--
1115
<?php

0 commit comments

Comments
 (0)