GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||
GeezerVison is showing github.com — gh-111178: Generate correct signature for most self converters by erlend-aasland · Pull Request #128447 · python/cpython Conversation
|
|
WDYT, @picnixz? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
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.
There was an error while loading. Please reload this page.
|
Yeah, this PR only makes sure we're using PyObject pointers in the PyMethodDef "entries". No new |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I'll leave this in draft so we don't create a review rush. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Friendly ping, @picnixz! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
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.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
+1, let's not delay this step.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
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.
There was an error while loading. Please reload this page.
|
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.
There was an error while loading. Please reload this page.
|
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.
There was an error while loading. Please reload this page.
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.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@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.
There was an error while loading. Please reload this page.
|
Hm, yeah I guess we should've synced it before merging. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Do you want to make a patch? (I can also do it if you don't have the time now) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Yes, I'm creating an amendment now. Compiling ... 🤖 🤖 🤖 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Amendment up: #129060. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Nice enhancement, thanks. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.