[compiler-rt] [compiler-rt][asan][tests] Stabilize wchar tests on Darwin/Android (PR #161624)
Yixuan Cao via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 5 03:02:49 PDT 2025
Cao-Wuhui wrote:
> I can still see the failure on Darwin with this:
> It looks like 'Good so far.' shows up _after_ the ASAN report, while the CHECK expects it before. Maybe 2>&1 merging streams for FileCheck works differently on Darwin compared to other systems?
> Could you consider 'reverting to green' this and previous PR, as suggested by @thurstond?
@wrotki Thanks for the detailed report and for pointing out the ordering issue on Darwin. I’ve opened a revert to restore green: Revert PR #162001 (for the follow-up #161624) is open. As a follow-up, I’ve prepared a test-only reland as a Draft here: #162002.
Root cause on Darwin: the sanitizer report and the pre-crash marker can race even on stderr, so “Good so far.” may appear after the ASan header. The reland makes the two potentially reordered lines a DAG group:
- `// CHECK-DAG: Good so far.`
- `// CHECK-DAG: ERROR: AddressSanitizer: stack-buffer-overflow on address [[ADDR:...]] at pc {{...}} bp {{...}} sp {{...}}`
and then keeps strict order for the subsequent lines:
- `// CHECK: WRITE of size {{[0-9]+}} at [[ADDR]] thread T0`
- `// CHECK: #0 {{0x[0-9a-f]+}} in wcscat`
Android tests keep `%env_asan_opts=log_to_stderr=1` to ensure the header is on stderr. If you prefer strict “revert to green” for both PRs first, I’m happy to also prepare a manual revert of the original PR #160493 despite conflicts.
Happy to iterate—thanks again for the quick feedback.
https://github.com/llvm/llvm-project/pull/161624
More information about the llvm-commits
mailing list