From: Rafael Espindola Date: Fri, 11 May 2012 03:42:13 +0000 (+0000) Subject: Fix a use after free when the streamer is destroyed. Fixes pr12622. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=383fd7afd9cd2431fdb0b32130fc8125903a7fa8;p=oota-llvm.git 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 --- diff --git a/tools/lto/LTOModule.cpp b/tools/lto/LTOModule.cpp index 1dbd64bdc0b..9a7d76832a1 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;