[Mlir-commits] [mlir] [MLIR][Python] remove `liveOperations` (PR #155114)

Stella Laurenzo llvmlistbot at llvm.org
Thu Sep 25 21:04:02 PDT 2025


stellaraccident wrote:

In the first part where you plussed me in, I almost stayed lurking, but you nerd sniped me with the last paragraph :)

I don't think you can catch this kind of crash. *Maybe* if you were just dealing with segmentation faults due to null pointers (this is how things like Java work: translating such segfaults into NPE). But what you are actually dealing with is stale pointers into random parts of the heap. These may even be valid allocations, because the way the heap gets used in mlir is pretty deterministic in a lot of cases. So you'd just be randomly stomping memory, sometimes doing dirty reads, sometimes doing stray writes and sometimes deallocating memory owned by something else. No catching any of that -- you just need to not do such things.

Most of the time, it's time to acknowledge a design flaw when you start going down the path of implementing some kind of pointer tracking GC :)

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


More information about the Mlir-commits mailing list