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

2022-10-31 Thread Timm Bäder via Phabricator via cfe-commits
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/

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

2022-10-31 Thread Anton Daubert via Phabricator via cfe-commits
antondaubert added inline comments. Comment at: clang/lib/AST/Interp/Program.h:54-56 +for (Global *G : Globals) { + G->block()->invokeDtor(); +} Seems like this change generates a ``` use-of-uninitialized-value lib/AST/Interp/Descriptor.cpp:150:22 i

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

2022-10-28 Thread Shafik Yaghmour via Phabricator via cfe-commits
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) { aaron.ballman wrote: > shafik wrote: > > I believe `Ptr` is not longer valid b/c of `free

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

2022-10-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman 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) { shafik wrote: > I believe `Ptr` is not longer valid b/c of `free(IM)` b/c what `Pt

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

2022-10-28 Thread Shafik Yaghmour via Phabricator via cfe-commits
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 b

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

2022-10-28 Thread Timm Bäder via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGee9bbfa5e6ac: [clang][Interp] Make sure we free() allocated InitMaps (authored by tbaeder). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136826/new/ https:

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

2022-10-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. The changes look correct to me, but you may want to wait a little bit before landing to give the other reviewers a chance to look this over given that there's no tests possible f

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

2022-10-27 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, erichkeane, tahonermann, shafik. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. They get allocated when calling `initialize()` on a