Fix parse cache ref race during cloned program updates - #4400
Fix parse cache ref race during cloned program updates#4400Daniel Rosenwasser (DanielRosenwasser) with Copilot wants to merge 10 commits into
Conversation
Co-authored-by: DanielRosenwasser <972891+DanielRosenwasser@users.noreply.github.com>
Co-authored-by: DanielRosenwasser <972891+DanielRosenwasser@users.noreply.github.com>
Co-authored-by: DanielRosenwasser <972891+DanielRosenwasser@users.noreply.github.com>
Co-authored-by: DanielRosenwasser <972891+DanielRosenwasser@users.noreply.github.com>
Co-authored-by: DanielRosenwasser <972891+DanielRosenwasser@users.noreply.github.com>
Co-authored-by: DanielRosenwasser <972891+DanielRosenwasser@users.noreply.github.com>
Co-authored-by: DanielRosenwasser <972891+DanielRosenwasser@users.noreply.github.com>
Co-authored-by: DanielRosenwasser <972891+DanielRosenwasser@users.noreply.github.com>
|
Copilot a snapshot should never be cloned after it's released. The ref count cache is the wrong place to look for the problem. If you can't reproduce the crash by driving a real |
Co-authored-by: andrewbranch <3277153+andrewbranch@users.noreply.github.com>
Reverted the unsupported parse-cache refcount changes in f23fd18. I did not keep the band-aid; without a real |
|
Very good PR now, approved |
A cloned project update can reuse
SourceFilepointers after their parse-cache entries were concurrently released by snapshot disposal. Re-refing those reused files withRefcould panic withcache entry not found.Parse cache
RefValue, which refs an existing entry or restores it from the reused value if it was deleted before the ref.RefIfPresentfor optional duplicate-source bookkeeping refs.Program clone path
SourceFilepointer.SourceFile.