[Mlir-commits] [mlir] [MLIR:Python] Fix race on PyOperations. (PR #139721)

Peter Hawkins llvmlistbot at llvm.org
Wed May 14 09:59:47 PDT 2025


hawkinsp wrote:

> low-level this looks good (modulo nits). high-level it's a little hard to keep the threads in mind (no pun intended) because the mutex is now pulling double-duty in guarding both `valid` and `liveOperations` (and also the relationship to incref). presumably you guys tested this fix in your CI and it worked (resolved the race) but a procedural question/reminder for myself: do we test FT mode here (ie in llvm-project CI)? also I believe we test ASAN (I think we do - there were definitely PRs a while back that enabled that for Python by @rkayaith) but do we test TSAN?

I'm not sure if you have a free-threaded build in your CI, but I did test with our reproducer and it fixed it.

https://github.com/llvm/llvm-project/pull/139721


More information about the Mlir-commits mailing list