aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lto
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2012-05-11 03:42:13 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2012-05-11 03:42:13 +0000
commit383fd7afd9cd2431fdb0b32130fc8125903a7fa8 (patch)
treee7a55bde8d702ee7a5cedf4976fa3b74154940cc /tools/lto
parent2b7ab5eb494a70cafb97c1f39ef8209d65c1f87c (diff)
downloadexternal_llvm-383fd7afd9cd2431fdb0b32130fc8125903a7fa8.zip
external_llvm-383fd7afd9cd2431fdb0b32130fc8125903a7fa8.tar.gz
external_llvm-383fd7afd9cd2431fdb0b32130fc8125903a7fa8.tar.bz2
Fix a use after free when the streamer is destroyed. Fixes pr12622.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156606 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/lto')
-rw-r--r--tools/lto/LTOModule.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/lto/LTOModule.cpp b/tools/lto/LTOModule.cpp
index 1dbd64b..9a7d768 100644
--- a/tools/lto/LTOModule.cpp
+++ b/tools/lto/LTOModule.cpp
@@ -409,7 +409,7 @@ void LTOModule::addAsmGlobalSymbol(const char *name,
// 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;