]> granicus.if.org Git - llvm/commit
[dsymutil] Fix stack-use-after-scope
authorJonas Devlieghere <jonas@devlieghere.com>
Fri, 4 Oct 2019 00:39:48 +0000 (00:39 +0000)
committerJonas Devlieghere <jonas@devlieghere.com>
Fri, 4 Oct 2019 00:39:48 +0000 (00:39 +0000)
commit42beceb5d45daef6c19d196ef26adbcb0fb0d0ac
tree16231cd8df3342d5c9aaf4ce51e1779f0137eecf
parentd321fa9f208fe536a4d55a984d93968a2acaf2db
[dsymutil] Fix stack-use-after-scope

The lambda is taking the stack-allocated Verify boolean by reference and
it would go out of scope on the next iteration. Moving it out of the
loop should fix the issue.

Fixes https://bugs.llvm.org/show_bug.cgi?id=43549

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