This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGeb5e11f460b1: [lldb] Fix
RichManglingContext::FromCxxMethodName() leak (authored by rupprecht).
Repository:
rG LLVM Github Monorepo
CHANGES
rupprecht added inline comments.
Comment at: lldb/source/Core/RichManglingContext.cpp:23
+RichManglingContext::~RichManglingContext() {
+ std::free(m_ipd_buf);
+ ResetCxxMethodParser();
dblaikie wrote:
> JDevlieghere wrote:
> > shafik wrote:
> > > rupprecht
rupprecht updated this revision to Diff 339264.
rupprecht marked 4 inline comments as done.
rupprecht added a comment.
- Add comments about memory management for m_ipd_buf
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100795/new/
dblaikie added inline comments.
Comment at: lldb/source/Core/RichManglingContext.cpp:23
+RichManglingContext::~RichManglingContext() {
+ std::free(m_ipd_buf);
+ ResetCxxMethodParser();
JDevlieghere wrote:
> shafik wrote:
> > rupprecht wrote:
> > > JDevlieghere
JDevlieghere added inline comments.
Comment at: lldb/source/Core/RichManglingContext.cpp:23
+RichManglingContext::~RichManglingContext() {
+ std::free(m_ipd_buf);
+ ResetCxxMethodParser();
shafik wrote:
> rupprecht wrote:
> > JDevlieghere wrote:
> > > Instead
shafik added a comment.
Thank you for reforactoring into `ResetCxxMethodParser`.
Comment at: lldb/source/Core/RichManglingContext.cpp:23
+RichManglingContext::~RichManglingContext() {
+ std::free(m_ipd_buf);
+ ResetCxxMethodParser();
rupprecht wrote:
>
rupprecht added inline comments.
Comment at: lldb/source/Core/RichManglingContext.cpp:23
+RichManglingContext::~RichManglingContext() {
+ std::free(m_ipd_buf);
+ ResetCxxMethodParser();
JDevlieghere wrote:
> Instead of managing memory by hand, can we use a
JDevlieghere added inline comments.
Comment at: lldb/source/Core/RichManglingContext.cpp:23
+RichManglingContext::~RichManglingContext() {
+ std::free(m_ipd_buf);
+ ResetCxxMethodParser();
Instead of managing memory by hand, can we use a `unique_ptr` instead?
teemperor accepted this revision.
teemperor added a comment.
This revision is now accepted and ready to land.
LGTM, thanks for fixing this!
We don't really have a thread for keep track of what other leak sanitiser
failures needs to be fixed, but I believe with this revision (+ the revisions
rupprecht updated this revision to Diff 338979.
rupprecht added a comment.
- Move comment about switch to the correct spot
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100795/new/
https://reviews.llvm.org/D100795
Files:
rupprecht updated this revision to Diff 338665.
rupprecht added a comment.
- Refactor cleanup of m_cxx_method_parser
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100795/new/
https://reviews.llvm.org/D100795
Files:
shafik added inline comments.
Comment at: lldb/source/Core/RichManglingContext.cpp:24
+ std::free(m_ipd_buf);
+ if (m_cxx_method_parser.hasValue()) {
+assert(m_provider == PluginCxxLanguage);
This code is duplicated from `ResetProvider(...)` we should
rupprecht created this revision.
rupprecht requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
`RichManglingContext::FromCxxMethodName` allocates a m_cxx_method_parser, but
never deletes it.
This fixes a `-DLLVM_USE_SANITIZER=Leaks` failure.
13 matches
Mail list logo