Skip to content
Commit 12ccc595 authored by Laszlo Kindrat's avatar Laszlo Kindrat
Browse files

[mlir] Change the order of members in MLIRContext to ensure dialects are destroyed first

Currently, the dialects precede the registered operations in the context object, which means that the latter is destroyed first. At the same time, Operation::~Operation dereferences the registered operation when destroying properties, which can cause use-after-free (e.g. if a dialect owns an op). This patch fixes that by changing the order of the members so that dialects come after registered operations.

Differential Revision: https://reviews.llvm.org/D151440
parent eb9ba243
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment