[lld][WebAssembly] Fix use after free of archive path
authorSam Clegg <sbc@chromium.org>
Wed, 18 Sep 2019 21:51:03 +0000 (21:51 +0000)
committerSam Clegg <sbc@chromium.org>
Wed, 18 Sep 2019 21:51:03 +0000 (21:51 +0000)
This was fixed in the ELF backend in https://reviews.llvm.org/D34554.

Differential Revision: https://reviews.llvm.org/D67676

llvm-svn: 372266

lld/wasm/InputFiles.h

index 2b25906..4a445a7 100644 (file)
@@ -54,7 +54,7 @@ public:
   Kind kind() const { return fileKind; }
 
   // An archive file name if this file is created from an archive.
-  StringRef archiveName;
+  std::string archiveName;
 
   ArrayRef<Symbol *> getSymbols() const { return symbols; }