Skip to content

Commit 3020792

Browse files
committed
Ignore STATUS_BAD_STACK exit codes under ASan for now
These are likely bogus, but that issue should be investigated when there is time; for now we just ignore it to make progress.
1 parent ba74617 commit 3020792

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

run-tests.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ function main(): void
159159
$temp_source, $temp_target, $test_cnt, $test_dirs,
160160
$test_files, $test_idx, $test_list, $test_results, $testfile,
161161
$user_tests, $valgrind, $sum_results, $shuffle, $file_cache, $num_repeats,
162-
$bless;
162+
$bless, $asan;
163163
// Parallel testing
164164
global $workers, $workerID;
165165
global $context_line_count;
@@ -363,6 +363,7 @@ function main(): void
363363
$workers = null;
364364
$context_line_count = 3;
365365
$num_repeats = 1;
366+
$asan = false;
366367

367368
$cfgtypes = ['show', 'keep'];
368369
$cfgfiles = ['skip', 'php', 'clean', 'out', 'diff', 'exp', 'mem'];
@@ -567,6 +568,7 @@ function main(): void
567568
break;
568569
case '--asan':
569570
case '--msan':
571+
$asan = true;
570572
$environment['USE_ZEND_ALLOC'] = 0;
571573
$environment['USE_TRACKED_ALLOC'] = 1;
572574
$environment['SKIP_ASAN'] = 1;
@@ -1312,7 +1314,10 @@ function system_with_timeout(
13121314
$data .= "\nTermsig=" . ($stat["exitcode"] - 128) . "\n";
13131315
} else if (defined('PHP_WINDOWS_VERSION_MAJOR') && (($stat["exitcode"] >> 28) & 0b1111) === 0b1100) {
13141316
// https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-erref/87fba13e-bf06-450e-83b1-9241dc81e781
1315-
$data .= "\nTermsig=" . $stat["exitcode"] . "\n";
1317+
// ignore STATUS_BAD_STACK exit codes under ASan for now
1318+
if (!$asan || $stat["exitcode"] !== -1073741784) {
1319+
$data .= "\nTermsig=" . $stat["exitcode"] . "\n";
1320+
}
13161321
}
13171322

13181323
proc_close($proc);

0 commit comments

Comments
 (0)