[Lldb-commits] [PATCH] D64777: Fix CreateFunctionTemplateSpecialization to prevent dangling poiner to stack memory

Raphael Isemann via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Jul 16 01:23:51 PDT 2019


teemperor accepted this revision.
teemperor added a comment.
This revision is now accepted and ready to land.

I assume we never tested this and that's how didn't found this in sanitized builds?

But this patch LGTM. Thanks Shafik!



================
Comment at: packages/Python/lldbsuite/test/expression_command/function_template_specialization_temp_args/main.cpp:1
+template <typename T>
+struct M {};
----------------
JDevlieghere wrote:
> Clang format?
Pretty sure that file is clang-formatted (at least my clang-format doesn't modify this file)


================
Comment at: source/Symbol/ClangASTContext.cpp:1619
+  TemplateArgumentList *template_args_ptr =
+      TemplateArgumentList::CreateCopy(func_decl->getASTContext(), infos.args);
 
----------------
JDevlieghere wrote:
> Out of curiosity, who does the cleanup of this pointer? 
It's like an AST object stored in the ASTContext.


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

https://reviews.llvm.org/D64777





More information about the lldb-commits mailing list