[lld] r226580 - Fix use after free.
Rafael Espindola
rafael.espindola at gmail.com
Tue Jan 20 09:08:28 PST 2015
Author: rafael
Date: Tue Jan 20 11:08:27 2015
New Revision: 226580
URL: http://llvm.org/viewvc/llvm-project?rev=226580&view=rev
Log:
Fix use after free.
This fixes running a few tests (including test/elf/Mips/e-flags-merge-1.test)
under asan.
Modified:
lld/trunk/lib/Driver/GnuLdDriver.cpp
Modified: lld/trunk/lib/Driver/GnuLdDriver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/GnuLdDriver.cpp?rev=226580&r1=226579&r2=226580&view=diff
==============================================================================
--- lld/trunk/lib/Driver/GnuLdDriver.cpp (original)
+++ lld/trunk/lib/Driver/GnuLdDriver.cpp Tue Jan 20 11:08:27 2015
@@ -591,7 +591,7 @@ bool GnuLdDriver::parse(int argc, const
ctx->getNodes().push_back(llvm::make_unique<FileNode>(std::move(file)));
break;
}
- std::string realpath = pathOrErr.get();
+ StringRef realpath = pathOrErr.get();
bool isScript =
(!path.endswith(".objtxt") && isLinkerScript(realpath, diagnostics));
More information about the llvm-commits
mailing list