Skip to content

fix: use array delete operator to delete array, this was causing a crash in node 24#206

Open
ramesh-kv-rc wants to merge 1 commit intodiscordjs:mainfrom
ramesh-kv-rc:main
Open

fix: use array delete operator to delete array, this was causing a crash in node 24#206
ramesh-kv-rc wants to merge 1 commit intodiscordjs:mainfrom
ramesh-kv-rc:main

Conversation

@ramesh-kv-rc
Copy link
Copy Markdown

Description

Testing this node add-on in node 24 Debian bookworm.
This node-addon is causing a SIGSEGV

Steps:
Create multiple (~10-15) OpusEncoders.
Call .decode on them
Release the encoders so that they are deleted.

The next OpusEncoder.decode causes a SIGSEGV.

Fix:
this->outPcm is allocated as an array, but delete was called without the array operator. Adding the array operator fixed the crash.

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.

2 participants