* Adjust the comment to reflect the fact that SIGBUS can occur not only
if the file is truncated, but also if an I/O error occurs while paging
in any part of it.
* Instead of setting a flag, just return EIO.
* Adjust the unit test accordingly.
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: thj, kevans
Differential Revision: https://reviews.freebsd.org/D55108
(cherry picked from commit a689bfa4e25af8307709dc12f75b0e02a65abf18)
libopenbsd retains recallocarray() during bootstrapping for now
as it is needed for mandoc.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D52864
(cherry picked from commit acd546f01e58354af049455472980c6c4a52e18b)
This adds support for two new diff algorithms, Myers diff and Patience
diff.
These algorithms perform a different form of search compared to the
classic Stone algorithm and support escapes when worst case scenarios
are encountered.
Add the -A flag to allow selection of the algorithm, but default to
using the new Myers diff implementation.
The libdiff implementation currently only supports a subset of input and
output options supported by diff. When these options are used, but the
algorithm is not selected, automatically fallback to the classic Stone
algorithm until support for these modes can be added.
Based on work originally done by thj@ with contributions from kevans@.
Sponsored by: Klara, Inc.
Reviewed by: thj
Differential Revision: https://reviews.freebsd.org/D44302