[issue42015] Order of decrementing reference counts in meth_dealloc

2020-10-12 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue42015] Order of decrementing reference counts in meth_dealloc

2020-10-12 Thread Henry Schreiner
Henry Schreiner added the comment: I tested before the patch, and I got 17 segfaults running a pybind11 module 20 times. After the patch, I ran about 50 times and had no segfaults! -- ___ Python tracker

[issue42015] Order of decrementing reference counts in meth_dealloc

2020-10-12 Thread miss-islington
miss-islington added the comment: New changeset 8a12503b4532e33d590ecea7eb94cd0e6b0f1488 by Miss Skeleton (bot) in branch '3.9': bpo-42015: Reorder dereferencing calls in meth_dealloc, to make sure m_self is kept alive long enough (GH-22670)

[issue42015] Order of decrementing reference counts in meth_dealloc

2020-10-12 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +21648 pull_request: https://github.com/python/cpython/pull/22674 ___ Python tracker

[issue42015] Order of decrementing reference counts in meth_dealloc

2020-10-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 04b8631d84a870dda456ef86039c1baf34d08500 by Yannick Jadoul in branch 'master': bpo-42015: Reorder dereferencing calls in meth_dealloc, to make sure m_self is kept alive long enough (GH-22670)

[issue42015] Order of decrementing reference counts in meth_dealloc

2020-10-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Yannick for your report and PR! -- ___ Python tracker ___ ___ Python-bugs-list

[issue42015] Order of decrementing reference counts in meth_dealloc

2020-10-12 Thread Yannick Jadoul
Yannick Jadoul added the comment: Yes, sorry for the delay; I got caught up in something else. Meanwhile, https://github.com/python/cpython/pull/22670 should solve our issues. I think Henry confirmed this locally? -- ___ Python tracker

[issue42015] Order of decrementing reference counts in meth_dealloc

2020-10-12 Thread Yannick Jadoul
Change by Yannick Jadoul : -- keywords: +patch pull_requests: +21643 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22670 ___ Python tracker ___

[issue42015] Order of decrementing reference counts in meth_dealloc

2020-10-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Do you mind to create a PR Yannick? -- nosy: +serhiy.storchaka ___ Python tracker ___ ___

[issue42015] Order of decrementing reference counts in meth_dealloc

2020-10-12 Thread Henry Schreiner
Change by Henry Schreiner : -- nosy: +Henry Schreiner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42015] Order of decrementing reference counts in meth_dealloc

2020-10-12 Thread Yannick Jadoul
New submission from Yannick Jadoul : In Python 3.9, the line `Py_XDECREF(PyCFunction_GET_CLASS(m));` was added to `meth_dealloc` (in `methodobject.c`). Unfortunately for pybind11, it's inserted exactly two lines too low, since it accesses the `PyMethodDef` and we store the `PyMethodDef`