aboutsummaryrefslogtreecommitdiff
path: root/tools
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
parent2b7ab5eb494a70cafb97c1f39ef8209d65c1f87c (diff)
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')
-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 1dbd64bdc0..9a7d76832a 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;