gh-111178: Generate correct signature for most self converters#128447
gh-111178: Generate correct signature for most self converters#128447erlend-aasland merged 6 commits into
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
|
I think this is what I had in mind. I'm no more on my dev session but I'll pick your branch, create a branch with all my known UBSan fixes branches and then I'll need to manually address the remaining ones. AFAICT, no new |
Sorry, something went wrong.
|
Yeah, this PR only makes sure we're using PyObject pointers in the PyMethodDef "entries". No new |
Sorry, something went wrong.
|
I'll leave this in draft so we don't create a review rush. |
Sorry, something went wrong.
|
Sorry for the late reply. I checked what I still need to do for other UBSan failures and there are quite a lot of places to fix. Here's what I can suggest: we first merge your PR and then we continue fixing the rest of UBSan failures. I wanted to delay this PR until the other failures are patched but there just too many errors in the clang output that it's hard to know where to start. So, I think we can first fix those now and then continue the work normally. I'll also tag @vstinner, @encukou and @ZeroIntensity who worked with me on that matter to hear their thoughts. |
Sorry, something went wrong.
encukou
left a comment
There was a problem hiding this comment.
+1, let's not delay this step.
Sorry, something went wrong.
|
Not sure if this is meant to be covered by this PR but: static PyObject *
list_append(PyListObject *self, PyObject *object)
{
PyObject *return_value = NULL;
Py_BEGIN_CRITICAL_SECTION(self);
return_value = list_append_impl((PyListObject *)self, object);
Py_END_CRITICAL_SECTION();
return return_value;
}has not been changed. |
Sorry, something went wrong.
|
Also, the subsequent casts: #define PY_LIST_CLEAR_METHODDEF \
{"clear", (PyCFunction)py_list_clear, METH_NOARGS, py_list_clear__doc__},for static PyObject *
py_list_clear(PyObject *self, PyObject *Py_UNUSED(ignored))
{
PyObject *return_value = NULL;
Py_BEGIN_CRITICAL_SECTION(self);
return_value = py_list_clear_impl((PyListObject *)self);
Py_END_CRITICAL_SECTION();
return return_value;
}are not needed but I don't know if it's possible to only remove the cast for the "fixed" methods or not. |
Sorry, something went wrong.
|
Correct, @picnixz, I don't think this is a complete solution. But these kinds of changes have a huge impact. It is pretty easy to validate this change, for example, but if we bake in another Argument Clinic change, it will be harder to validate the generated output. IMO, it is better to address this in a follow-up PR. |
Sorry, something went wrong.
Sure! I just wanted to be sure that you knew about this. But yes, otherwise I validate the current change (sorry for not having said it explicitly). |
Sorry, something went wrong.
|
@erlend-aasland We're having some CI failures now but I think it's because main wasn't merged recently and clinic not regen. |
Sorry, something went wrong.
|
Hm, yeah I guess we should've synced it before merging. |
Sorry, something went wrong.
|
Do you want to make a patch? (I can also do it if you don't have the time now) |
Sorry, something went wrong.
|
Yes, I'm creating an amendment now. Compiling ... 🤖 🤖 🤖 |
Sorry, something went wrong.
|
Nice enhancement, thanks. |
Sorry, something went wrong.
edited by bedevere-app
Bot
LoadingUh oh!
There was an error while loading. Please reload this page.
Copy link Copy MarkdownSorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.