[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2018-11-22 Thread STINNER Victor
STINNER Victor added the comment: New changeset c9b3fc6b59b625c36c31ad437253e7140938af1a by Victor Stinner in branch '3.6': bpo-9263: _PyObject_Dump() detects freed memory (GH-10061) (GH-10662) (GH-10663) https://github.com/python/cpython/commit/c9b3fc6b59b625c36c31ad437253e7140938af1a

[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2018-11-22 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +9916 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2018-11-22 Thread STINNER Victor
STINNER Victor added the comment: New changeset 95036ea25d47f0081bda2ba96ea327f3375cb6a4 by Victor Stinner in branch '3.7': [3.7] bpo-9263: _PyObject_Dump() detects freed memory (GH-10061) (GH-10662) https://github.com/python/cpython/commit/95036ea25d47f0081bda2ba96ea327f3375cb6a4

[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2018-11-22 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +9915 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2018-11-22 Thread STINNER Victor
STINNER Victor added the comment: New changeset 2cf5d32fd9e61488e8b0be55a2e92a752ba8b06b by Victor Stinner in branch 'master': bpo-9263: Fix _PyObject_Dump() for freed object (#10661) https://github.com/python/cpython/commit/2cf5d32fd9e61488e8b0be55a2e92a752ba8b06b --

[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2018-11-22 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +9914 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2018-10-26 Thread Dave Malcolm
Dave Malcolm added the comment: Thanks! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2018-10-26 Thread STINNER Victor
STINNER Victor added the comment: I pushed the change and even more, so I consider that the issue can now be closed... 8 years later! Thank you very much Dave Malcolm for this nice idea, and for its implementation. Thanks Bohuslav "Slavek" Kabrda for the rebase in 2013, and thanks to my

[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2018-10-26 Thread STINNER Victor
STINNER Victor added the comment: New changeset 50fe3f8913c503e63f4cfb8ddcf8641ef7ad0722 by Victor Stinner in branch 'master': bpo-9263: _PyXXX_CheckConsistency() use _PyObject_ASSERT() (GH-10108) https://github.com/python/cpython/commit/50fe3f8913c503e63f4cfb8ddcf8641ef7ad0722 --

[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2018-10-26 Thread STINNER Victor
STINNER Victor added the comment: New changeset 0862505a0377c12e8004b2eb8de0555f26ce9530 by Victor Stinner in branch 'master': bpo-9263: Use _PyObject_ASSERT() in typeobject.c (GH-10111) https://github.com/python/cpython/commit/0862505a0377c12e8004b2eb8de0555f26ce9530 --

[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2018-10-26 Thread STINNER Victor
STINNER Victor added the comment: New changeset a4b2bc70f69d93d8252861b455052c051b7167ae by Victor Stinner in branch 'master': bpo-9263: Use _PyObject_ASSERT() in gcmodule.c (GH-10112) https://github.com/python/cpython/commit/a4b2bc70f69d93d8252861b455052c051b7167ae --

[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2018-10-26 Thread STINNER Victor
STINNER Victor added the comment: New changeset 24702044afb1d4ad7568bf6aa7450b14dc44a38f by Victor Stinner in branch 'master': bpo-9263: Use _PyObject_ASSERT() in object.c (GH-10110) https://github.com/python/cpython/commit/24702044afb1d4ad7568bf6aa7450b14dc44a38f --

[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2018-10-25 Thread STINNER Victor
STINNER Victor added the comment: New changeset 3ec9af75f6825a32f369ee182a388c365db241b6 by Victor Stinner in branch 'master': bpo-9263: _Py_NegativeRefcount() use _PyObject_AssertFailed() (GH-10109) https://github.com/python/cpython/commit/3ec9af75f6825a32f369ee182a388c365db241b6

[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2018-10-25 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +9444 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2018-10-25 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +9443 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2018-10-25 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +9442 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2018-10-25 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +9441 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2018-10-25 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +9440 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2018-10-25 Thread STINNER Victor
STINNER Victor added the comment: New changeset 626bff856840f471e98ec627043f780c111a063d by Victor Stinner in branch 'master': bpo-9263: Dump Python object on GC assertion failure (GH-10062) https://github.com/python/cpython/commit/626bff856840f471e98ec627043f780c111a063d --

[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2018-10-23 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2018-10-23 Thread STINNER Victor
STINNER Victor added the comment: 00170-gc-assertions.patch is used in the Fedora package of Python. I converted the patch to a pull request: PR 10062. My PR only uses the new assertion macro once. I plan to write more changes to use the new assertion macros in more places, once the first

[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2018-10-23 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +9398 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2018-10-23 Thread STINNER Victor
STINNER Victor added the comment: New changeset 82af0b63b07aa8d92b50098e382b458143cfc677 by Victor Stinner in branch 'master': bpo-9263: _PyObject_Dump() detects freed memory (GH-10061) https://github.com/python/cpython/commit/82af0b63b07aa8d92b50098e382b458143cfc677 -- nosy:

[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2018-10-23 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +9397 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2013-06-10 Thread Bohuslav Slavek Kabrda
Bohuslav Slavek Kabrda added the comment: I'm currently patching Python 3.3.2 with this, so I thought it might be nice to attach an up-to-date patch. The only notable difference is that I added self.preclean() at the beginning of test_refcount_errors - without it, running test suite produced

[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2011-03-15 Thread Dave Malcolm
Changes by Dave Malcolm dmalc...@redhat.com: -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9263 ___ ___ Python-bugs-list mailing

[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2011-03-15 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: How about turning these asserts into Py_FatalError()s and then enabling Victor's faulthandler extension? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9263

[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2011-03-15 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: I'd suggest calling Py_FatalError rather than calling abort() directly in _PyObject_AssertFailed, but otherwise this looks like a nice improvement over standard C asserts for state invariants that may be broken by buggy C extensions. For the

[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2011-01-10 Thread Dave Malcolm
Dave Malcolm dmalc...@redhat.com added the comment: Attaching updated version of the patch. I've added a selftest which (in a sacrificial subprocess) abuses ctypes to break an ob_refcnt, and then triggers a garbage collection. I also changed the printing to stderr to directly use fprintf and

[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2011-01-10 Thread Dave Malcolm
Dave Malcolm dmalc...@redhat.com added the comment: As above, but I added an extra call to fflush in case the call to _PyObject_Dump leads to a segfault. -- Added file: http://bugs.python.org/file20344/py3k-objdump-on-gcmodule-assertions-2011-01-10-002.patch

[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2011-01-03 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- versions: +Python 3.3 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9263 ___ ___

[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2010-11-22 Thread Dave Malcolm
Changes by Dave Malcolm dmalc...@redhat.com: -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9263 ___ ___ Python-bugs-list mailing

[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2010-11-22 Thread Dave Malcolm
Dave Malcolm dmalc...@redhat.com added the comment: Attaching a simplified version of the patch; I got rid of the callbacks. Still doesn't have test cases. I suspect that the use of __STRING and __PRETTY_FUNCTION__ may be compatibility issues. I believe that __FILE__ and __LINE__ and

[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2010-07-14 Thread Dave Malcolm
New submission from Dave Malcolm dmalc...@redhat.com: Modules/gcmodule.c contains various assertions which can fail due to reference counting errors elsewhere in either python, or an extension module. These can be difficult to track down. In the hope of maximizing the information from crash