Skip to content

Do not crash when it has nothing to say. #796

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

Merged
merged 1 commit into from
Apr 6, 2023

Conversation

l29ah
Copy link
Contributor

@l29ah l29ah commented Apr 5, 2023

Otherwise observing this in the interactive mode:
/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/bits/stl_vector.h:1230: reference std::vector::back() [_Tp = int, _Alloc = std::allocator]: Assertion '!this->empty()' failed.

@l29ah
Copy link
Contributor Author

l29ah commented Apr 5, 2023 via email

Otherwise observing this in the interactive mode:
/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/bits/stl_vector.h:1230: reference std::vector<int>::back() [_Tp = int, _Alloc = std::allocator<int>]: Assertion '!this->empty()' failed.
@l29ah l29ah force-pushed the vector-crash-fix branch from dd8103e to 79ed023 Compare April 5, 2023 23:40
Copy link
Member

@slaren slaren left a comment

Choose a reason for hiding this comment

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

Not sure in what cases this may happen, but looks good regardless.

@l29ah
Copy link
Contributor Author

l29ah commented Apr 5, 2023

Not sure in what cases this may happen, but looks good regardless.

I got it to happen somewhat reliably after asking alpaca w/ the bob prompt "How do you do?" and then "OK.", but it's generally often does this for me on subsequent inquiries. Also i have a hypothesis that most users use an older/non-hardened version of the gcc's standard libarary that doesn't assert stuff, so it silently compares some garbage.

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