New submission from Alexey Kazantsev: Pythons prior to 3.4.0 print
Vector! Device! while >=3.4.0 print Device! Vector! If we replace Main with Vector on line 21, the behavior becomes random: in 50% of all cases it prints the wrong sequence, in other 50% the right. Our team treats this as a bug for several reasons: 1) Objects should be destroyed in breadth first reference tree traversal order, starting from the root. There are no cycles. It is nonsense to have freed children in parent's destructor. 2) Our applications suffer very much from this bug. Real "Vector" holds GPGPU memory and real "Device" holds the context, and CUDA/OpenCL require the context to be freed the last. With CUDA, the invalid destructor call order leads to segmentation faults. This may have something to deal with the implementation of PEP 442 (though in our case there no reference cycles at all). ---------- files: bug.py messages: 238661 nosy: Alexey Kazantsev priority: normal severity: normal status: open title: __del__() order is broken since 3.4.0 type: behavior versions: Python 3.4, Python 3.5 Added file: http://bugs.python.org/file38599/bug.py _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23720> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com