-
Notifications
You must be signed in to change notification settings - Fork 39
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
Random segmentation fault #18
Comments
Hi again.
Maybe offset is the cause? |
You'd better use strncat in your patch instead of strcat, otherwise you might get buffer overflow. You also better accumulate text in asterisk variables instead of patching the sources. |
The text is acumulated while the locution in SpeechBackgrond() is playing, I think can't do that in dialplan... :S |
I think the problem is in the assert. Look here: Although despite correcting the name of the variable, it still allows a large offset to pass. I had another core dump with an offset value of 524616. |
asserts are disabled by default, still, it is a valid fix I think, thank you.
You can probably add a printf of the offset value every frame and collect logs showing the offset changes. You still need to fix strcat issue in your code. |
I was thinking assert was enabled... :( Thank you for your recommendation on strncat(). |
Hi.
I'm here begging for help or at least some directions.
I get sometimes, not always, this segfault:
Don't always get it, it's so random!
And to put things more easy, I've modified app_speech_utils.c a little. But, I think my modifications don't have to do with this part of code... I'm not 100% sure.
I attach here my asterisk patch and my vosk-asterisk patch for the braves who want to try. I have tried them with 16.18.0 and git version of asterisk. My modifications try to solve a pair of problems I encounter:
Hope you can at least point me in a good direction to follow.
Thank you in advance.
ast-patch.txt
vosk-ast-patch.txt
core-thread1.txt
The text was updated successfully, but these errors were encountered: