[issue23868] Uninitialized objects are tracked by the garbage collector

2019-12-20 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: In summary, a normal allocation for an object tracked by the Garbage collector follows these steps: 1.- Call PyObject_GC_New or PyObject_GC_NewVar or related APIs. 2.- Initialize everything and make sure the object is consistent. 3.- Call

[issue23868] Uninitialized objects are tracked by the garbage collector

2019-12-20 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: If I understand what you say correctly, it does not seem correct, the object will only be tracked by the collector when you call PyObject_GC_Track. indeed, the documentation warns about this: void PyObject_GC_Track(PyObject *op)ΒΆ Adds the object op to

[issue23868] Uninitialized objects are tracked by the garbage collector

2019-12-20 Thread Batuhan
Change by Batuhan : -- nosy: +BTaskaya, pablogsal type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue23868] Uninitialized objects are tracked by the garbage collector

2015-04-04 Thread Hristo Venev
New submission from Hristo Venev: An object starts being tracked by the GC after being allocated, but before being initialized. If during initialization the GC runs, this may lead to tp_traverse being called on an uninitialized object. -- components: Interpreter Core messages: 240079