The libc++ dsl gained a cache to improve startup performance in
5390c5a96e9774f0f7d748b5a466c308f916ecd0, but it turns out this cache
can return cache hits even when it shouldn't.
We currently pass c.substitutions as one of the cache keys. However, this
means we are storing a reference to a mutable list as the cache key.
I added some debugging code that modifies config.substitutions between
checks and it turns out that the cache hits even though it shouldn't.
As a workaround for this issue, we now store a deep copy of the cache key
in the cache. I plan to submit a follow-up change that only saves the
relevant substitutions to reduce the amount of copying.
Details
Details
- Reviewers
ldionne - Group Reviewers
Restricted Project
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Abandoning in favour of the committed solution (which also allows using a dict for lookup instead): https://reviews.llvm.org/rGddb2baf9fbff3d574c6c2bd69c2c9569100509a4