[PATCH] D155110: [memprof] Fix use-after-free in peekBuildIds.

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 12 14:09:54 PDT 2023


tejohnson added a comment.

In D155110#4495062 <https://reviews.llvm.org/D155110#4495062>, @snehasish wrote:

> In D155110#4495040 <https://reviews.llvm.org/D155110#4495040>, @tejohnson wrote:
>
>> lgtm but you could also consider collapsing both BuildIds and BuildIdsSet into a single SetVector for conciseness.
>
> I did consider this prior to sending out the patch. Since SetVector::takeVector return a SmallVector we need to either
>
> - create a new result std::vector prior to avoid changing the return type, negating the benefit
> - update the return type which breaks downstream usage and will need to be updated
>
> Since this isn't performance critical I chose the simplest approach.

Ack - thanks for the explanation. Agree with the approach you chose.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D155110



More information about the llvm-commits mailing list