[PATCH] D112130: [clangd] Fix use-after-free in HeaderIncluderCache

2021-10-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. kadircet marked an inline comment as done. Closed by commit rG60e19f6752b7: [clangd] Fix use-after-free in HeaderIncluderCache (authored by kadircet). Changed prior to commit: https://reviews.llvm.org/D112130?vs=380895&id

[PATCH] D112130: [clangd] Fix use-after-free in HeaderIncluderCache

2021-10-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked an inline comment as done. kadircet added inline comments. Comment at: clang-tools-extra/clangd/TUScheduler.cpp:294 invalidate(First); +// MainToFirst entry should stay alive, as Associations might be pointing at +// its key. sammc

[PATCH] D112130: [clangd] Fix use-after-free in HeaderIncluderCache

2021-10-20 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/TUScheduler.cpp:294 invalidate(First); +// MainToFirst entry should stay alive, as Associations might be pointing a

[PATCH] D112130: [clangd] Fix use-after-free in HeaderIncluderCache

2021-10-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 380895. kadircet added a comment. - Rather than dropping the entry, perform an extra check during invalidate. As the entry actually backs the data for main file strings in associations. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION htt

[PATCH] D112130: [clangd] Fix use-after-free in HeaderIncluderCache

2021-10-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: usaxena95, arphaman, javed.absar. kadircet requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. Includer cache cou