Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
C
chashmap
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 11
    • Issues 11
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 3
    • Merge Requests 3
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • redox-os
  • chashmap
  • Merge Requests
  • !6

Open
Opened Mar 25, 2020 by Alex Hornby@ahornbyContributor
  • Report abuse
Report abuse

Fix panic after remove()

  • Overview 0
  • Commits 2
  • Changes 2

Fix panic after remove raised in #9

Reproduced issue by adding new tests, checked they failed

The underlying problem was lookup() and lookup_mut()'s handling of removed buckets, but lookup_or_free() did the right thing.

With the test in place fixes were:

  1. Generalized the old lookup_or_free to cover all lookup cases by parameterizing the lock->guard function.

  2. Delete dead code no longer needed due to above

Tested using cargo test:

test result: ok. 34 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Reference: redox-os/chashmap!6
Source branch: fix_remove