Skip to content

gh-96678: A few asserts to demonstrate undefined behaviour #18

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

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

Conversation

matthiasgoergens
Copy link
Owner

@matthiasgoergens matthiasgoergens commented Sep 8, 2022

@matthiasgoergens matthiasgoergens changed the title Test for UB in audioop A few asserts to demonstrate undefined behaviour Sep 8, 2022
@matthiasgoergens matthiasgoergens changed the title A few asserts to demonstrate undefined behaviour gh-96678: A few asserts to demonstrate undefined behaviour Sep 8, 2022
@@ -812,11 +812,16 @@ bu_int(_structmodulestate *state, const char *p, const formatdef *f)
Py_ssize_t i = f->size;
const unsigned char *bytes = (const unsigned char *)p;
do {
assert(0 <= x);

Choose a reason for hiding this comment

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

These are addressed in python#96739. Any feedback you have on that PR would be welcome.

Copy link
Owner Author

Choose a reason for hiding this comment

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

Thanks, I'll have a look.

The PR description already sounds exactly like the approach I had in mind for fixing these issues.

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