tbaeder added inline comments.
================ Comment at: clang/lib/AST/Interp/InterpBlock.h:97 void invokeCtor() { - std::memset(data(), 0, getSize()); + std::memset(rawData(), 0, Desc->getAllocSize()); if (Desc->CtorFn) ---------------- aaron.ballman wrote: > tbaeder wrote: > > aaron.ballman wrote: > > > Why do we want to overwrite the metadata here? > > This is only called after creating an new block, so nothing is being > > overwritten, the metadata hasn't been filled-in yet. > Sounds like a good reason not to memset over that block then; it's useless > work that will be thrown away anyway (I worry we may come to rely on this > zero init accidentally)? FWIW I looked into this and I think zeroing everything is what we want, so the initmap is null initially CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135750/new/ https://reviews.llvm.org/D135750 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits