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),


        
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to