[llvm-commits] [llvm] r156606 - /llvm/trunk/tools/lto/LTOModule.cpp

Rafael Espindola rafael.espindola at gmail.com
Thu May 10 20:42:13 PDT 2012


Author: rafael
Date: Thu May 10 22:42:13 2012
New Revision: 156606

URL: http://llvm.org/viewvc/llvm-project?rev=156606&view=rev
Log:
Fix a use after free when the streamer is destroyed. Fixes pr12622.

Modified:
    llvm/trunk/tools/lto/LTOModule.cpp

Modified: llvm/trunk/tools/lto/LTOModule.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lto/LTOModule.cpp?rev=156606&r1=156605&r2=156606&view=diff
==============================================================================
--- llvm/trunk/tools/lto/LTOModule.cpp (original)
+++ llvm/trunk/tools/lto/LTOModule.cpp Thu May 10 22:42:13 2012
@@ -409,7 +409,7 @@
     // much.
 
     // fill information structure
-    info.name = name;
+    info.name = entry.getKey().data();
     info.attributes =
       LTO_SYMBOL_PERMISSIONS_DATA | LTO_SYMBOL_DEFINITION_REGULAR | scope;
     info.isFunction = false;





More information about the llvm-commits mailing list