◐ Shell
clean mode source ↗

gh-111178: fix UBSan failures in `Modules/_lzmamodule.c` by picnixz · Pull Request #129783 · python/cpython

Conversation

@picnixz

@picnixz picnixz commented

Feb 7, 2025

edited by bedevere-app Bot

Loading

@picnixz picnixz marked this pull request as ready for review

February 7, 2025 18:07

@picnixz

Ah I'm sorry I put this one as ready for review but I learned that _ + capital letter was also UB (#128248 (comment)) so I'll fix them tomorrow.

@picnixz picnixz marked this pull request as ready for review

February 8, 2025 09:27

encukou

}
PyTypeObject *tp = Py_TYPE(self);
tp->tp_free((PyObject *)self);
tp->tp_free(self);

Choose a reason for hiding this comment

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

Shouldn't this be op?

Choose a reason for hiding this comment

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

tp_free takes a void * as input, so it doesn't matter. I've chosen the one that reduces the diff (but honestly, I don't know whether I've always been consistent)

@picnixz picnixz deleted the fix/ubsan/lzma-111178 branch

February 21, 2025 12:36

Labels

2 participants

@picnixz @encukou