)]}'
{
  "commit": "6fc718d5877404e7070d87f5486c8dddfcc1119f",
  "tree": "b13a2c833acdf8ac84a8f134463e44ddb0f04313",
  "parents": [
    "00f931a750d865c48d5bb105411c04a9166c45c4"
  ],
  "author": {
    "name": "Daniel Lowengrub",
    "email": "lowengrub@google.com",
    "time": "Sun Nov 08 20:28:20 2026 -0800"
  },
  "committer": {
    "name": "Copybara-Service",
    "email": "copybara-worker@google.com",
    "time": "Sun Nov 08 20:29:04 2026 -0800"
  },
  "message": "Compute commutative two-thread crash signatures for TSan data races.\n\nA single-thread stack trace from the sanitizer error summary callback only captures the detecting thread of a ThreadSanitizer data race, which is non-deterministic when two racing threads can detect the race in either order.\n\nUnder `ABSL_HAVE_THREAD_SANITIZER`, compute a commutative two-thread signature in `FuzzTestComputeSanitizerCrashSignature`, which the sanitizer error summary callback calls. ThreadSanitizer sets the current report of the reporting thread before printing it (which calls the summary hook), so `__tsan_get_current_report()` returns the report being printed. For race reports (`data-race`, `data-race-vptr` and `external-race` from `__tsan_get_report_data`), extract the top non-internal application function from the stack trace of each of the two racing memory operations via `__tsan_get_report_mop` (using the shared `std::atomic_flag`-guarded static storage) and format `\u003ccrash_type\u003e:\u003cmin(f0, f1)\u003e \u003c-\u003e \u003cmax(f0, f1)\u003e` (with `\u003cunknown\u003e` for a missing frame). TSan\u0027s report type is the source of truth, so this does not depend on the summary text mapping (and covers custom `__tsan_external_register_header` race tags). If there is no current report (e.g., for deadly signals), the report is not a race, or neither memory operation has an application frame, fall back to the single-thread stack signature, so that data races never get a bare `data-race` signature. Other TSan reports with two memory operations (e.g., `heap-use-after-free`) are always detected by the accessing thread, so they keep the deterministic single-thread stack signature.\n\nThis keeps the existing 2-argument `FuzzTestSetSanitizerErrorSummaryCallback` ABI (used by FuzzTest for Rust), and does not define a strong `__tsan_on_report`, so binaries that define their own can still link.\n\nPiperOrigin-RevId: 1017008435\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "a6bf89c1b516965fb1544eb9d2c5c32cd9e40ce1",
      "old_mode": 33188,
      "old_path": "fuzztest/internal/BUILD",
      "new_id": "e2c8e2862e7fad8511d3a3e9fa8c088f910d12e4",
      "new_mode": 33188,
      "new_path": "fuzztest/internal/BUILD"
    },
    {
      "type": "modify",
      "old_id": "93c5484e027ae3cc874266dbe47629f7c4a58c22",
      "old_mode": 33188,
      "old_path": "fuzztest/internal/CMakeLists.txt",
      "new_id": "8187ddd0c7c562fa2e592cae064482de298aabbd",
      "new_mode": 33188,
      "new_path": "fuzztest/internal/CMakeLists.txt"
    },
    {
      "type": "modify",
      "old_id": "2e5698a261d743754aa15e71d78511875f2e0219",
      "old_mode": 33188,
      "old_path": "fuzztest/internal/sanitizer_interface.cc",
      "new_id": "a2c5a1315d345954236fca77a8fa7feff83e974c",
      "new_mode": 33188,
      "new_path": "fuzztest/internal/sanitizer_interface.cc"
    },
    {
      "type": "modify",
      "old_id": "9f63bb7a6ea22ad6b70e3d4ffce5d22a79960842",
      "old_mode": 33188,
      "old_path": "fuzztest/internal/sanitizer_interface.h",
      "new_id": "a835935811b5c332d255aa25d077a88b36aabcdd",
      "new_mode": 33188,
      "new_path": "fuzztest/internal/sanitizer_interface.h"
    },
    {
      "type": "modify",
      "old_id": "2a022e16f78dcece7014ebf20feb9e77d198a222",
      "old_mode": 33188,
      "old_path": "fuzztest/internal/sanitizer_interface_test.cc",
      "new_id": "658d7f450a9b2416fa03324ba900aa9679dff0af",
      "new_mode": 33188,
      "new_path": "fuzztest/internal/sanitizer_interface_test.cc"
    }
  ]
}
