[Lldb-commits] [lldb] 58dd658 - [lldb] Fix a use-after-free in FindFileTest.cpp

Raphael Isemann via lldb-commits lldb-commits at lists.llvm.org
Tue Nov 2 04:39:51 PDT 2021


Author: Raphael Isemann
Date: 2021-11-02T12:39:26+01:00
New Revision: 58dd658583eec9af24ca1262e1bce9f884d65487

URL: https://github.com/llvm/llvm-project/commit/58dd658583eec9af24ca1262e1bce9f884d65487
DIFF: https://github.com/llvm/llvm-project/commit/58dd658583eec9af24ca1262e1bce9f884d65487.diff

LOG: [lldb] Fix a use-after-free in FindFileTest.cpp

ArrayRef doesn't take ownership.

Added: 
    

Modified: 
    lldb/unittests/Target/FindFileTest.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/unittests/Target/FindFileTest.cpp b/lldb/unittests/Target/FindFileTest.cpp
index 9d7269780950a..77d374d1f498d 100644
--- a/lldb/unittests/Target/FindFileTest.cpp
+++ b/lldb/unittests/Target/FindFileTest.cpp
@@ -84,7 +84,7 @@ TEST_F(FindFileTest, FindFileTests) {
       {R"(C:\foo)", llvm::sys::path::Style::windows, DirName.c_str()},
       {R"(C:\foo\test)", llvm::sys::path::Style::windows, FileName.c_str()}};
 
-  ArrayRef<FileSpec> fails{
+  std::vector<FileSpec> fails{
       // path not mapped
       FileSpec("/foo", llvm::sys::path::Style::posix),
       FileSpec("/new", llvm::sys::path::Style::posix),


        


More information about the lldb-commits mailing list