[Mlir-commits] [mlir] [mlir] Use non thread-local allocator for DistinctAttr when threading is disabled (PR #128566)
Artemiy Bulavin
llvmlistbot at llvm.org
Fri Feb 28 08:01:40 PST 2025
abulavin wrote:
@joker-eph @gysit Thanks for the review comments. After Mehdi's suggestion to test what happens when multi-threading and crash reproduction are both enabled, I have had to make some significant changes to fix this issue. As it turns out, enabling multithreading will still exhibit the same use-after-free error because the lifetime of the thread-local storage only lasts for the lifetime of the crash reproducer thread. To remedy this, I have added some extra logic to disable the use of thread-local storage in the `DistinctAttributeAllocator` when the PassManager runs with crash recovery enabled. Since in this case disabling thread-local storage now means thread-safety is a concern, if threading is not disabled then a synchronised allocator is used. I appreciate this may be less than ideal so I am open to suggestions to remedy this.
Please let me know if anything is not clear.
https://github.com/llvm/llvm-project/pull/128566
More information about the Mlir-commits
mailing list