Skip to content

Fix stack overflow

Pre-release
Pre-release

Choose a tag to compare

@mnemnion mnemnion released this 06 Aug 00:41
0249d68

Due to the Unicode handling, the bisection portion of the Myers algorithm can end up with an empty pair of strings as the before or after portion of the region of interest.

Since this doesn't reduce the problem space, the bisection would eventually reënter in the same state, up to stack overflow. Instead, we discard the empty strings, and treat the other two as an atomic delete/insert pair.