[all-commits] [llvm/llvm-project] 0db952: [clang][ClangScanDeps] Relax logging-two-threads f...

Taimuraz Kaitmazov via All-commits all-commits at lists.llvm.org
Tue Jul 28 11:06:39 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0db95253f93987e4c37594883208a42d3ebee563
      https://github.com/llvm/llvm-project/commit/0db95253f93987e4c37594883208a42d3ebee563
  Author: Taimuraz Kaitmazov <5769345+atassis at users.noreply.github.com>
  Date:   2026-07-28 (Tue, 28 Jul 2026)

  Changed paths:
    M clang/test/ClangScanDeps/logging-two-threads.c

  Log Message:
  -----------
  [clang][ClangScanDeps] Relax logging-two-threads for duplicate module validation (#210587)

`ClangScanDeps/logging-two-threads.c` is flaky. It asserts each module's
timestamp is written exactly once, but under
`-fmodules-validate-once-per-build-session` two workers scanning
different TUs can both notice the shared module is unvalidated this
session and each validate and record it before the other's write lands,
so its timestamp is written once or twice depending on the interleaving.

The double write is harmless: the timestamp field is atomic and both
workers store the same session time. Only the exact-count assertion was
wrong.

Relax the test to the real invariant: the shared module A is written
once or twice and the single-TU module B exactly once. Module compile
and pcm write stay exactly once (the in-memory cache builds each module
once) and the per-module event ordering is still checked by the sequence
blocks.

The redundant validation itself (two workers validating the same module)
is a separate, pre-existing issue noted by the validation-lock TODO in
`ModuleCache.h`; I plan to look at that separately.

AI assistance: drafted with AI help; reviewed and validated by me.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list