OSDN Git Service

[llvm-nm] Fix use-after-free for MachOUniversalBinaries
authorFrancis Visoiu Mistrih <francisvm@yahoo.com>
Mon, 19 Nov 2018 17:19:50 +0000 (17:19 +0000)
committerFrancis Visoiu Mistrih <francisvm@yahoo.com>
Mon, 19 Nov 2018 17:19:50 +0000 (17:19 +0000)
commit3a00f497ebe6b6eb6d6e855a9e078f5122a8b136
treec4e70b4cf00e5e12d8b68654f4f0496e7db02a69
parent3d5599fc6591296416409cccbfa49e532a50291d
[llvm-nm] Fix use-after-free for MachOUniversalBinaries

MachOObjectFile::getHostArch() returns a temporary, and getArchName
returns a StringRef pointing to a temporary std::string.

No tests since it doesn't trigger any errors except with the sanitizers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@347230 91177308-0d34-0410-b5e6-96231b3b80d8
tools/llvm-nm/llvm-nm.cpp