Closed Yehouda closed 4 years ago
Thanks for reporting it. As far as I could make out, the problem was caused by the line-level optimization (diff.lisp, lines 136–139):
(when (and (stringp a) (stringp b) *diff-check-lines-length*
(> (length a) *diff-check-lines-length*)
(> (length b) *diff-check-lines-length*))
(diff-line-mode a b test))
Diff-line-mode
abbreviates the inputs by splitting them into lines and replacing the lines with hash indexes. When the inputs are sufficiently large, as in this test, the splitting and hashing takes some time, which is not covered by the diff-bisect
timeout mechanism. However, it falls within the time measured by timed-diff
in the test.
Solved by switching off the optimization, tested with the interpreter artificially slowed down (cpulimit -l 10 sbcl
).
The test diff-timout fails on slow machines, because the code outside diff-bisect (where it calls past-diff-deadline) is not limited by *diff-timeout*.
This specific test fails for slow machines, but it means similar failures for faster machines on more complex diff operations.
It should either have a way to propagate reaching the deadline out of diff-bisect to the callers, or check in other places too.