diff options
| author | Petr Pavlu <petr.pavlu@arm.com> | 2017-07-12 12:38:31 +0000 |
|---|---|---|
| committer | Petr Pavlu <petr.pavlu@arm.com> | 2017-07-12 12:38:31 +0000 |
| commit | 8c5dafde494fd63bfa4ca58b1919936fdd5204e8 (patch) | |
| tree | 33ac421698e38b667d1149d17fb10e3818780a46 /llvm/lib/Transforms/Utils/ModuleUtils.cpp | |
| parent | 293b4fc04e6a49667ee878b6f252cc68c42fa385 (diff) | |
| download | llvm-8c5dafde494fd63bfa4ca58b1919936fdd5204e8.zip llvm-8c5dafde494fd63bfa4ca58b1919936fdd5204e8.tar.gz llvm-8c5dafde494fd63bfa4ca58b1919936fdd5204e8.tar.bz2 | |
[MainLoop] Fix possible use of an invalid iterator
Store file descriptors from loop.m_read_fds (if FORCE_PSELECT is
defined) and signals from loop.m_signals that need to be processed in
MainLoop::RunImpl::ProcessEvents() into a separate vector and then
iterate over this container to invoke the callbacks.
This prevents a problem where when the code iterated directly over
m_read_fds/m_signals, a callback invoked from within the loop could
modify these variables and invalidate the loop iterator. This would then
result in an assertion failure in llvm::DenseMapIterator::operator++().
Differential Revision: https://reviews.llvm.org/D35298
llvm-svn: 307782
Diffstat (limited to 'llvm/lib/Transforms/Utils/ModuleUtils.cpp')
0 files changed, 0 insertions, 0 deletions
