Skip to content
This repository was archived by the owner on Nov 3, 2021. It is now read-only.
This repository was archived by the owner on Nov 3, 2021. It is now read-only.

Memory leak when verifying ECDSA signatures #136

Open
@go1dfish

Description

@go1dfish

Not sure how to isolate further from here, but I've been tracking down a memory leak in gun and have isolated it to the following line:

https://github.com/amark/gun/blob/master/sea/verify.js#L28

Which is effectively this call:

webcrypto.subtle.verify({ name: 'ECDSA', hash: { name: 'SHA-256' } }, key, sig, new Uint8Array(hash))

If I short circuit the code before this line and pretend validation was successful the leaks stop.

The memory leak seems proportionate to how often this method is called and will continue to grow until node crashes with out of memory errors.

Any help solving this would be appreciated.

Platform is node v10.14.2 on linux 4.9.87.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions