[PATCH] D146412: [NFC] Fix potential for use-after-free in DumpModuleInfoAction

2023-03-30 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG42ae055b4c92: [NFC] Fix potential for use-after-free in DumpModuleInfoAction (authored by Fznamznon). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D146412: [NFC] Fix potential for use-after-free in DumpModuleInfoAction

2023-03-30 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added a comment. The test fail is unrelated, seem to be broken by https://reviews.llvm.org/D146811 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146412/new/ https://reviews.llvm.org/D146412

[PATCH] D146412: [NFC] Fix potential for use-after-free in DumpModuleInfoAction

2023-03-30 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon updated this revision to Diff 509580. Fznamznon added a comment. Rebase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146412/new/ https://reviews.llvm.org/D146412 Files: clang/include/clang/Frontend/FrontendActions.h clang/lib/Front

[PATCH] D146412: [NFC] Fix potential for use-after-free in DumpModuleInfoAction

2023-03-29 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann accepted this revision. tahonermann added a comment. Thank you, Mariya! Looks good to me! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146412/new/ https://reviews.llvm.org/D146412 ___ cfe-co

[PATCH] D146412: [NFC] Fix potential for use-after-free in DumpModuleInfoAction

2023-03-29 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added inline comments. Comment at: lldb/source/Commands/CommandObjectTarget.cpp:2182-2183 -clang::DumpModuleInfoAction dump_module_info; -dump_module_info.OutputStream = &result.GetOutputStream().AsRawOstream(); +std::shared_ptr Out( +&result.GetOu

[PATCH] D146412: [NFC] Fix potential for use-after-free in DumpModuleInfoAction

2023-03-29 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon updated this revision to Diff 509420. Fznamznon added a comment. Add comment explaining custom deleter. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146412/new/ https://reviews.llvm.org/D146412 Files: clang/include/clang/Frontend/Fron

[PATCH] D146412: [NFC] Fix potential for use-after-free in DumpModuleInfoAction

2023-03-29 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann added inline comments. Comment at: lldb/source/Commands/CommandObjectTarget.cpp:2182-2183 -clang::DumpModuleInfoAction dump_module_info; -dump_module_info.OutputStream = &result.GetOutputStream().AsRawOstream(); +std::shared_ptr Out( +&result.Get

[PATCH] D146412: [NFC] Fix potential for use-after-free in DumpModuleInfoAction

2023-03-29 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon updated this revision to Diff 509372. Fznamznon added a comment. Add a little bit of safety. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146412/new/ https://reviews.llvm.org/D146412 Files: clang/include/clang/Frontend/FrontendActions

[PATCH] D146412: [NFC] Fix potential for use-after-free in DumpModuleInfoAction

2023-03-29 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. This looks much better to me, thank you! LGTM with one small nit for safety. Comment at: clang/include/clang/Frontend/FrontendActions.h:191 + DumpModuleInfoAct