"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Dag-Erling Smørgrav <des@FreeBSD.org>
Subject:
Re: diff: detect input file truncation
To:
gameoftrees@openbsd.org
Date:
Thu, 23 May 2024 13:13:53 +0200

Download raw body.

Thread
Stefan Sperling <stsp@stsp.name> writes:
> I don't think we should try to implement a workaround in the diff
> code for this. If files being diffed change in any way while the
> diff code is working with them it is unreasonable to expect a useful
> result. Applications calling into this code should try to ensure 
> that the passed map + length remains valid. If this is not easy
> and they would like see an error in regular code flow rather than
> a signal then there is a compile-time switch to disable mmap:

That was my initial reaction as well, but the performance drop was
massive.

DES
-- 
Dag-Erling Smørgrav - des@FreeBSD.org