[PATCH] D136826: [clang][Interp] Make sure we free() allocated InitMaps

Shafik Yaghmour via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 28 12:08:44 PDT 2022


shafik added inline comments.


================
Comment at: clang/lib/AST/Interp/Descriptor.cpp:46
+
+  Ptr += sizeof(InitMap *);
   for (unsigned I = 0, NE = D->getNumElems(); I < NE; ++I) {
----------------
I believe `Ptr` is not longer valid b/c of `free(IM)` b/c what `Ptr` points to has not been free'ed 

I am looking at the wording now but I am curious what @aaron.ballman thinks.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136826



More information about the cfe-commits mailing list