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

Fix crash with _GLIBCXX_ASSERTIONS #42

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hfiguiere
Copy link

Songbird crash when build with -Wp,-D_GLIBCXX_ASSERTIONS on Linux.

tl;dr you try to access an elment out of bounds.

std::copy(&_allFormants[val - 1][0],
&_allFormants[val - 1][NUM_FORMANTS_PER_VOWEL],
std::copy(_allFormants[val - 1].begin(),
_allFormants[val - 1].end(),
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to be fair, I'm pretty sure the whole function can be rewrtiten as

    Vowel SongbirdFilterModule<T>::getVowelDescription(int val) const {
        return _allFormants[val - 1];
    }

@jd-13
Copy link
Owner

jd-13 commented May 12, 2022

Thanks for spotting this, I wasn't planning on merging pull requests for this repo since I'm not totally sure about the implications for copyright, but I can look into making some changes here to tidy this up over the weekend

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.

None yet

2 participants