diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2018-03-09T13·19+0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2018-03-09T13·19+0100 |
commit | 24b739817fb719553dd4840308ee32ff60c88c1f (patch) | |
tree | d2208dd82273bcb81b9b0ead2fddf15e6e3b7695 /src/libexpr/primops/fetchGit.cc | |
parent | dc83c8eea596fec746b025079d28d4cebeab97e8 (diff) |
Fix double free in Store::queryPathInfo()
It was holding on to a Value* (i.e. a std::shared_ptr<ValidPathInfo>*) outside of the pathInfoCache lock, so the std::shared_ptr could be destroyed between the release of the lock and the decrement of the std::shared_ptr refcount. This can happen if more than 'path-info-cache-size' paths are added in the meantime, *or* if clearPathInfoCache() is called. The hydra-queue-runner queue monitor thread periodically calls the later, so is likely to trigger a crash. Fixes https://github.com/NixOS/hydra/issues/542.
Diffstat (limited to 'src/libexpr/primops/fetchGit.cc')
0 files changed, 0 insertions, 0 deletions