This repository has been archived by the owner on Jan 16, 2024. It is now read-only.
GstreamerMediaPlayer: Fix callback function use-after-free #1867
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Allocate a copy of the callback function and promise, and keep it until it
was executed. This fixes a problem where the callback function could
be freed as soon as the callback function sets the promise value and
the thread waiting on the promise exits the function immediately, freeing
the closure data while it is still executing.
We're trying to use the SDK in an x86-32 environment (not using the sample app), but are running into issues that appear to be timing sensitive bugs. This environment is considerably faster than the preferred arm-based Raspi-based setup, which is likely a key factor in reproducing this problem. It would randomly cause Alexa to stop responding and be stuck in "thinking" state, no longer accepting any requests. Usually after making no more than 5-15 requests, which can also easily be reproduced in an automated fashion.