aboutsummaryrefslogtreecommitdiff
path: root/contrib/libdiff/include/diff_main.h
Commit message (Collapse)AuthorAgeFilesLines
* libdiff: Simplify truncation detectionDag-Erling Smørgrav2026-02-051-1/+0
| | | | | | | | | | | | | | | * 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
* libdiff: Detect and recover from file truncation.Dag-Erling Smørgrav2024-05-201-0/+1
| | | | | | | | | | | If a memory-mapped file is truncated before we get to the end, the atomizer may catch SIGBUS. Detect that, reduce the input length to what we were actually able to read, and set a flag so the caller can take further action (e.g. warn the user and / or start over). Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D45217
* Add 'contrib/libdiff/' from commit '9eb461aa4b61ab47855b2cee9e5b626a76888b5e'Dag-Erling Smørgrav2024-03-111-0/+264
git-subtree-dir: contrib/libdiff git-subtree-mainline: f6d489f402c320f1a6eaa473491a0b8c3878113e git-subtree-split: 9eb461aa4b61ab47855b2cee9e5b626a76888b5e Reviewed by: imp Sponsored by: Klara, Inc.