Opened 9 years ago

Last modified 9 years ago

#13896 closed defect

Fix cython's gc_track and gc_untrack — at Initial Version

Reported by: nbruin Owned by: rlm
Priority: blocker Milestone: sage-5.6
Component: memleak Keywords:
Cc: SimonKing, jpflori Merged in:
Authors: Reviewers:
Report Upstream: Completely fixed; Fix reported upstream Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

In a long sage-devel thread we eventually found in this message that a GC during a weakref callback on a Cython class can lead to double deallocation of that class. In Python's Objects/typeobject.h, line 1024 and onwards, there are some comments that indicate that earlier version of Python were bitten by this problem too. The solution is to insert the appropriate PyObject_GC_Untrack and PyObject_GC_Track in cython's deallocation code. This is best fixed in cython itself.

Change History (1)

Changed 9 years ago by nbruin

Patch to more reliably produce crash

Note: See TracTickets for help on using tickets.