You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from mlir.ir import *
m = ir.Module.create()
m.operation.erase()
because erase erases the module operation, and then the destructor of PyModule attempts to erase it the second time (transitively through the module object).
We should connect PyModule to the corresponding PyOperation in the bindings and avoid calling mlirModuleDestroy if the operation was already destroyed, using the valid flag on the operation.
The text was updated successfully, but these errors were encountered:
from mlir.ir import *
m = ir.Module.create()
m.operation.erase()
because erase erases the module operation, and then the destructor of PyModule attempts to erase it the second time (transitively through the module object).
We should connect PyModule to the corresponding PyOperation in the bindings and avoid calling mlirModuleDestroy if the operation was already destroyed, using the valid flag on the operation.
The following trivial code crashes:
because
erase
erases the module operation, and then the destructor ofPyModule
attempts to erase it the second time (transitively through the module object).We should connect
PyModule
to the correspondingPyOperation
in the bindings and avoid callingmlirModuleDestroy
if the operation was already destroyed, using thevalid
flag on the operation.The text was updated successfully, but these errors were encountered: