This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Fix invalidated reference when loading dependent dialects
ClosedPublic

Authored by Mogball on Dec 15 2021, 8:58 PM.

Details

Summary

When a dialect is loaded with getOrLoadDialect, its constructor may recurse and call getOrLoadDialect on a dependent dialect, which may result in an insertion in the dialect map, invalidating the reference to the (previously null) dialect pointer.

Diff Detail

Event Timeline

Mogball created this revision.Dec 15 2021, 8:58 PM
Mogball requested review of this revision.Dec 15 2021, 8:58 PM
mehdi_amini accepted this revision.Dec 15 2021, 9:31 PM
This revision is now accepted and ready to land.Dec 15 2021, 9:31 PM