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

SrsSource destructor coredump #986

Closed
fantasyARM opened this issue Sep 18, 2017 · 3 comments
Closed

SrsSource destructor coredump #986

fantasyARM opened this issue Sep 18, 2017 · 3 comments
Assignees
Labels
Duplicated Duplicated bug. TransByAI Translated by AI/GPT.
Milestone

Comments

@fantasyARM
Copy link

fantasyARM commented Sep 18, 2017

srs_kernel_codec.cpp LINE:567 Passing acodec to the audio object internally, causing double free.
Remove the free on line 420 of srs_kernel_codec.cpp. This object is passed in from the outside and its lifecycle is managed by the outside, so it should not be freed in the destructor of SrsFrame. [bug]

TRANS_BY_GPT3

@ynchsung
Copy link

ynchsung commented Sep 19, 2017

Previously, when cleaning up SrsSource, it is possible that a premature free occurred, but other coroutines continued to use that memory, causing the process to crash.
(#713)
Would using std::shared_ptr for these pointers solve the problem? When using this type of pointer, there is no need to free the memory manually. When there are no pointers pointing to that memory, the library will automatically free it. This can solve the issue of double free or premature free.

TRANS_BY_GPT3

@winlinvip
Copy link
Member

SRS2 or SRS3?

@winlinvip
Copy link
Member

winlinvip commented Jan 28, 2020

Dup to #413

Workaround: #1579 (comment)

@winlinvip winlinvip self-assigned this Sep 13, 2021
@winlinvip winlinvip added the Duplicated Duplicated bug. label Sep 13, 2021
@winlinvip winlinvip added this to the 5.0 milestone Sep 13, 2021
@winlinvip winlinvip changed the title SrsSource析构coredump SrsSource destructor coredump Jul 28, 2023
@winlinvip winlinvip added the TransByAI Translated by AI/GPT. label Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicated Duplicated bug. TransByAI Translated by AI/GPT.
Projects
None yet
Development

No branches or pull requests

3 participants