philnik777 wrote:

Maybe to make it a bit more clear:
```c++
#include <vector>

auto test(std::vector<int>& v) {
  v.reserve(v.size() + 10);
  auto ret = v.data();
  int arr[10] = {};
  v.append_range(arr);
  return *ret;
}
```
is a completely valid program, which has a potential use-after-free due to this 
bug.

https://github.com/llvm/llvm-project/pull/183722
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to