Skip to content

Race condition in MemoryCache #34

Description

@carterpage

Size isn't locked. Simultaneous puts will do weird things.

checkSize() or anything else with an iterator will also have undefined behavior.

Safest quick fix is to synchronize on the public methods, not the "cache" object. Shouldn't be all that different speed-wise, except when a cache resize happens.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions