Fix use-after-free in ModuleManager
authorBen Langmuir <blangmuir@apple.com>
Wed, 21 Oct 2015 23:12:45 +0000 (23:12 +0000)
committerBen Langmuir <blangmuir@apple.com>
Wed, 21 Oct 2015 23:12:45 +0000 (23:12 +0000)
commita50dbb2065b34ed27019dad21c22097b352f5b42
tree1360bf5006c9c10d36de499e8874dc8a31350e98
parent626beefd1ce702e3e4a3d9b63f7dcc88e72657ab
Fix use-after-free in ModuleManager

When removing out-of-date modules we might have left behind a VisitOrder
that contains pointers to freed ModuleFiles.  This was very rarely seen,
because it only happens when modules go out of date and the VisitOrder
happens to have the right size to not be recomputed.

Thanks ASan!

rdar://23181512

llvm-svn: 250963
clang/lib/Serialization/ModuleManager.cpp