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

Timm Bäder via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 31 06:46:23 PDT 2022


tbaeder added inline comments.


================
Comment at: clang/lib/AST/Interp/Program.h:54-56
+    for (Global *G : Globals) {
+      G->block()->invokeDtor();
+    }
----------------
antondaubert wrote:
> Seems like this change generates a
> 
> ```
> use-of-uninitialized-value lib/AST/Interp/Descriptor.cpp:150:22 in dtorRecord(clang::interp::Block*, char*, clang::interp::Descriptor*)
> ```
> 
> when executing the test test/AST/Interp/arrays.cpp with a memory sanitizer.
Should be fixed by https://github.com/llvm/llvm-project/commit/da4b929da79f4ce886f5612e3c84d29c1d2632f7


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