aaron.ballman added a comment.

In D154581#4484363 <https://reviews.llvm.org/D154581#4484363>, @tbaeder wrote:

> One problem this does not fix (but rather introduce) is that the 
> `InterpState` will also free initmaps of global variables which haven't been 
> fully initialized. When the initialization fails midway throught, the 
> `InterpState` will free the `InitMap`, leaving the global variable with a 
> dangling pointer to an `InitMap`.

That seems like a pretty dangerous thing to leave in the interpreter; should we 
be using a `shared_ptr` for `InitMap`? Or perhaps it should be moved into 
`Program` rather than left in `InterpState`?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D154581/new/

https://reviews.llvm.org/D154581

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to