Skip to content

Conversation

@gitoleg
Copy link
Contributor

@gitoleg gitoleg commented Nov 11, 2019

This PR resolves a couple of long-standing issues with the cache plugin
and provides a more efficient procedure for finding the cache index
(see #966) and prevents the leakage of entries in the case when the same
entry is added twice (see #967).

This PR resolves a couple of long-standing issues with the cache plugin
and provides a more efficient procedure for finding the cache index
(see BinaryAnalysisPlatform#966) and prevents the leakage of entries in the case when the same
entry is added twice (see BinaryAnalysisPlatform#967).
Copy link
Member

@ivg ivg left a comment

Choose a reason for hiding this comment

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

It doesn't look ready for merge right now. I think we shall revisit it and design it more carefully, instead of try to hot-fix in the last minute before the release.

}) in
let entry = {
size = size path; path; atime = ctime; ctime; hits = 1
} in
Copy link
Member

Choose a reason for hiding this comment

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

I don't like performing a removal as a side-effect of a pure function. It is better to express it explicitly, e.g.,

if Map.mem index.entries id then begin
   warning "overwriting an entry";
   Index.remove_entry e;
end

Also, in general, this PR doesn't follow the spirit of the implementation, where the entries are removed all in one place. This is assumed in the code so I'm not sure whether this change breaks this assumptions anywhere.

@ivg ivg merged commit 24c81b5 into BinaryAnalysisPlatform:master Nov 11, 2019
@gitoleg gitoleg deleted the cache-fix branch May 13, 2020 21:11
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.

2 participants