• Kevin Modzelewski's avatar
    Make list.sort more safe · 92596a7d
    Kevin Modzelewski authored
    Use the CPython technique of swapping out the list contents for
    the duration of the sort, since the compare functions can look at
    the list.
    
    This wasn't even being triggered by something that explicitly looked
    at the list: the issue was that the comparison function invoked a
    gc collection and the gc saw the half-mutated list.
    92596a7d
list.cpp 46.6 KB