[issue45758] Crash on Py_DecRef'ing builtin object from previous run

2021-11-12 Thread Victor Milovanov
Victor Milovanov added the comment: I think documentation should clarify that. Right now this line in the docs got me thinking that anything with an external strong reference won't be deallocated: "Memory tied up in circular references between objects is not freed." ---

[issue45758] Crash on Py_DecRef'ing builtin object from previous run

2021-11-08 Thread Victor Milovanov
New submission from Victor Milovanov : Trying to Py_DecRef owned reference to builtin "iter" crashes if the reference was alive when runtime was reinitialized. Py_Initialize(); PyObject* builtins = PyEval_GetBuiltins(); PyObject* iter = PyDict_GetItemString(builtins, "iter&quo

[issue45266] subtype_clear can not be called from derived types

2021-09-22 Thread Victor Milovanov
Victor Milovanov added the comment: To put it differently, if you think in terms of MRO, my custom type's MRO is my_type_clear (from my type), subtype_clear (from PyTypeObject), etc And subtype_clear incorrectly assumes that it is the first entry in the object's MRO list for tp_clear

[issue45266] subtype_clear can not be called from derived types

2021-09-22 Thread Victor Milovanov
New submission from Victor Milovanov : I am trying to define a type in C, that derives from PyTypeObject. I want to override tp_clear. To do so properly, I should call base type's tp_clear and have it perform its cleanup steps. PyTypeObject has a tp_clear implementation: subtype_clear

[issue14965] super() and property inheritance behavior

2021-04-24 Thread Victor Milovanov
Victor Milovanov added the comment: There's a patch attached to this bug. Why is its stage "needs patch"? -- nosy: +Victor Milovanov ___ Python tracker <https://bugs.python.o

[issue35235] Access violation on alloc in Windows x86-64 python, pymalloc_alloc

2019-08-24 Thread Victor Milovanov
Victor Milovanov added the comment: A bit more information: pool->freeblock for the broken pool looks like this: 0xXYZ? while pool itself looks like this: 0x??XYZ000 -- ___ Python tracker <https://bugs.python.org/issu

[issue35235] Access violation on alloc in Windows x86-64 python, pymalloc_alloc

2019-08-23 Thread Victor Milovanov
Victor Milovanov added the comment: In my case it always happens in pymalloc_alloc when size == 5, e.g. when accessing usedpools[10]. Specifically freeblock pointer in usedpools[10] is wy off (essentially, seemingly random number looking like 0xX000) where it is supposed to be (e.g

[issue35235] Access violation on alloc in Windows x86-64 python, pymalloc_alloc

2019-08-23 Thread Victor Milovanov
Victor Milovanov added the comment: This reproduces stably for me when running unit tests in Python.NET project at commit 5e276d9. -- nosy: +Victor Milovanov ___ Python tracker <https://bugs.python.org/issue35