Skip to content
  • George Nachman's avatar
    Add iTermAtomicMutableArrayOfWeakObjects with some sanity checking to figure... · 789a86e7
    George Nachman authored
    Add iTermAtomicMutableArrayOfWeakObjects with some sanity checking to figure out how the heck the call to removeObjectsPassingTest: in -[LineBlock dealloc] is throwing an exception that we're removing indexes past the end of the array. The only way that could happen is a synchronization bug. It looks airtight to me, but hopefully the new assertions will turn something up.
    
    Fix a bug when dropping part of a raw line. The LineBlock's metadata caches the number of wrapped lines. When the mutation thread drops excess lines, the metadata is updated in the progenitor but that update was not reflected in its clients. Later on a wrong cached value was used causing a negative length in _wrappedLineWithWrapWidth and therefore a negative length for a ScreenCharArray leading to a bad memcpy when trying to pad the line.
    789a86e7