Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: TimeCache handle key collision to prevent leak #358

Merged
merged 2 commits into from
Oct 21, 2022

Conversation

dapplion
Copy link
Contributor

@dapplion dapplion commented Oct 7, 2022

This doesn't show up often since we currently use in Lodestar sha256 function with 8 bytes so the chance of collision is exceedingly rare.

Closes #356

@dapplion dapplion requested a review from a team as a code owner October 7, 2022 14:26
@dapplion dapplion changed the title TimeCache handle key collision to prevent leak fix: TimeCache handle key collision to prevent leak Oct 7, 2022
test/timeCache.spec.ts Outdated Show resolved Hide resolved
@dapplion
Copy link
Contributor Author

dapplion commented Oct 7, 2022

CI failed with

Error: test/compliance.spec.ts(19,25): error TS2345: Argument of type 'import("/home/runner/work/js-libp2p-gossipsub/js-libp2p-gossipsub/node_modules/@libp2p/interface-pubsub-compliance-tests/node_modules/@libp2p/components/dist/src/index").Components' is not assignable to parameter of type 'import("/home/runner/work/js-libp2p-gossipsub/js-libp2p-gossipsub/node_modules/@libp2p/components/dist/src/index").Components'.
  Types have separate declarations of a private property 'peerId'.
Error: test/utils/create-pubsub.ts(23,5): error TS2741: Property 'acceptIncomingConnection' is missing in type 'MockConnectionManager' but required in type 'ConnectionManager'.

@wemeetagain wemeetagain merged commit 8f0ba37 into master Oct 21, 2022
@wemeetagain wemeetagain deleted the dapplion/timecache-collision branch October 21, 2022 15:19
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.

Memory leak due to hash collision
3 participants