[PATCH] D154581: [clang][Interp] Track existing InitMaps in InterpState
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 1 07:44:25 PDT 2023
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
More information about the cfe-commits
mailing list