Skip to content

Conversation

@benlangmuir
Copy link

Check that action cache references point to valid CAS objects by ensuring they are contained within the corresponding CAS and also that the offsets match. This prevents accidentally referencing "dead" index records that were not properly flushed to disk, which can lead to the action cache pointing to the wrong data or to garbage data.

rdar://126642956
(cherry picked from commit a451ff0)

…refs (llvm#171732)

Check that action cache references point to valid CAS objects by
ensuring they are contained within the corresponding CAS and also that
the offsets match. This prevents accidentally referencing "dead" index
records that were not properly flushed to disk, which can lead to the
action cache pointing to the wrong data or to garbage data.

rdar://126642956
(cherry picked from commit a451ff0)
@benlangmuir benlangmuir requested a review from a team as a code owner December 11, 2025 18:38

// FIXME: on newer branches we have refactored getIndexProxyFromRef to return
// Expected<IndexProxy>. As a stop gap, provide a checked API.
Expected<IndexProxy> getIndexProxyFromRefChecked(InternalRef Ref) const;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cachemeifyoucan review note: I introduced this and used it from getObjectPresence to workaround the differences in Error-handling between main and stable/21.x.

@benlangmuir
Copy link
Author

@swift-ci please test llvm

@benlangmuir
Copy link
Author

@swift-ci please test

@benlangmuir
Copy link
Author

@swift-ci please test Windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants