This is an archive of the discontinued LLVM Phabricator instance.

[clangd][BackgroundIndexLoader] Directly store DependentTU while loading shard
ClosedPublic

Authored by kadircet on Jul 19 2019, 1:59 AM.

Details

Summary

We were deferring the population of DependentTU field in LoadedShard
until BackgroundIndexLoader was consumed. This actually triggers a use after
free since the shards FileToTU was pointing at could've been moved while
consuming the Loader.

Diff Detail

Repository
rL LLVM

Event Timeline

kadircet created this revision.Jul 19 2019, 1:59 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 19 2019, 1:59 AM
sammccall accepted this revision.Jul 19 2019, 2:53 AM
This revision is now accepted and ready to land.Jul 19 2019, 2:53 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJul 19 2019, 3:18 AM
clang-tools-extra/trunk/clangd/index/BackgroundRebuild.cpp