diff options
| author | Chandler Carruth <chandlerc@gmail.com> | 2013-08-18 07:20:52 +0000 |
|---|---|---|
| committer | Chandler Carruth <chandlerc@gmail.com> | 2013-08-18 07:20:52 +0000 |
| commit | ab4e0c0ad9cbb744e159f6ff6022a9b7f889147c (patch) | |
| tree | dd9c9e862667b38a11a19e16a0f476ecc1a76cf3 /lib/CodeGen/CodeGenFunction.cpp | |
| parent | 3de73f007b0ca4cf611d3929d8da73ea7d0c2b8a (diff) | |
| download | clang-ab4e0c0ad9cbb744e159f6ff6022a9b7f889147c.tar.gz clang-ab4e0c0ad9cbb744e159f6ff6022a9b7f889147c.tar.bz2 clang-ab4e0c0ad9cbb744e159f6ff6022a9b7f889147c.tar.xz | |
Fix a use-after-free found in libclang when doing code completion. The
loop processing the candidates can cause new declerations to be added to
the context, invalidating lookup_result. To avoid that, make a copy of
the list of declarations to iterate over.
I don't have a way to check in a test case for this as it involves
a giant pile of source code and a generated PCH file used to accelerate
code completion, all of this running under ASan.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188623 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions
