Skip to content

Commit 246fb8b

Browse files
authored
ci(profiling): mark gh20838.phpt flaky (#4373)
1 parent 2e9a4c5 commit 246fb8b

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

‎.gitlab/run_php_language_tests.sh‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,20 @@ if (PHP_VERSION_ID >= 80300 && is_file($hard_timeout_test)) {
4242
}
4343
}
4444
45+
// The tracing JIT (PHP 8.4+) can lose a register-allocated loop variable when
46+
// EG(vm_interrupt) is set mid-iteration, which the profiler does from its
47+
// sampling thread: https://github.com/php/php-src/pull/24610
48+
// Expected to be fixed in 8.4.28 and 8.5.13.
49+
$jit_interrupt_test = 'ext/opcache/tests/jit/gh20838.phpt';
50+
$jit_interrupt_affected = (PHP_VERSION_ID >= 80400 && PHP_VERSION_ID < 80428)
51+
|| (PHP_VERSION_ID >= 80500 && PHP_VERSION_ID < 80513);
52+
if ($jit_interrupt_affected && is_file($jit_interrupt_test)) {
53+
$contents = file_get_contents($jit_interrupt_test);
54+
if (!preg_match('/^--FLAKY--\r?$/m', $contents)) {
55+
file_put_contents($jit_interrupt_test, str_replace('--INI--', "--FLAKY--\nhttps://github.com/php/php-src/pull/24610\n--INI--", $contents));
56+
}
57+
}
58+
4559
$phar_gzip_test = 'ext/phar/tests/phar_gzip.phpt';
4660
if (PHP_VERSION_ID < 70400 && is_file($phar_gzip_test)) {
4761
// Backport the flaky mtime check removal: https://github.com/php/php-src/commit/228388447509107d61cb253acb614d8d3e5efabf

0 commit comments

Comments
 (0)