[all-commits] [llvm/llvm-project] f42e1a: Fix tsan problem where the per-thread shared_ptr()...

Parker Schuh via All-commits all-commits at lists.llvm.org
Fri Feb 3 15:01:40 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f42e1a7484796e3d0915abbc35ce6bdb205a1678
      https://github.com/llvm/llvm-project/commit/f42e1a7484796e3d0915abbc35ce6bdb205a1678
  Author: Parker Schuh <parkers at google.com>
  Date:   2023-02-03 (Fri, 03 Feb 2023)

  Changed paths:
    M mlir/include/mlir/Support/ThreadLocalCache.h
    M mlir/test/CAPI/pdl.c
    M mlir/test/CAPI/transform.c

  Log Message:
  -----------
  Fix tsan problem where the per-thread shared_ptr() can be locked right before the cache is destroyed causing a race where it tries to remove an entry from a destroyed cache.

This is a rollforward with fixes of https://reviews.llvm.org/rGbcc10817d5569172ee065015747e226280e9b698 (originally https://reviews.llvm.org/D142394). The original patch exposed an asan problem on aarch64, which is fixed by simply calling the context destructors properly.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D143294




More information about the All-commits mailing list