CryptoKey class should use Finalizable class policy
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- c, javascript, wasm
- Domain
- backend
Research direction
Find the CryptoKey class and its reserved KeyData slot, then read how other classes use FinalizableClassPolicy and implement finalize methods. Update CryptoKey to release the stored vector during finalization; done means the key data is freed when the object is finalized without disrupting existing CryptoKey behavior.
Written by the indexing model from the issue text.
Description
CryptoKey JS class is storing the key in the slot but it never releases it, so vector is leaking memory.
JS::SetReservedSlot(instance, std::to_underlying(Slots::KeyData), JS::PrivateValue(data.release()->data()));
The class should use finalizable policy and drop the vector in finalize method:
class CryptoKey : public BuiltinImpl<CryptoKey, FinalizableClassPolicy>
- Dominant language
- C
- Stars
- 293
- Forks
- 61
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 12
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from bytecodealliance/StarlingMonkey
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
bytecodealliance/StarlingMonkey#345 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
bytecodealliance/StarlingMonkey#344 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 52/100
bytecodealliance/StarlingMonkey#339 ·
Maintainers usually reply within 1 day
-
The forgiving decoder implementation is ignoring padding and whitespaces in crypto-algorithm.cppOpen
Difficulty 2/5 1-3 hours Newbie friendliness 52/100
bytecodealliance/StarlingMonkey#338 ·
Maintainers usually reply within 1 day
-
FinalizationRegistry callbacks never run: no host cleanup callback is setPossibly taken @veeshi claimed this 6 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 55/100
bytecodealliance/StarlingMonkey#327 · 5 comments · 1 reaction ·
Maintainers usually reply within 1 day
All issues in bytecodealliance/StarlingMonkey
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
HexaCluster/credcheck#86 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
mongodb/winkerberos#175 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
AOMediaCodec/SVT-AV1#3320 ·
-
difficulty: easy
Difficulty 2/5 1-3 hours Newbie friendliness 64/100