Download raw body.
got: munmap: Invalid argument
On Sat, Nov 28, 2020 at 05:54:12PM +0100, Christian Weisgerber wrote:
> Running the blame.sh regression test on FreeBSD shows this:
>
> ./blame.sh -q -r "/tmp"
> got: munmap: Invalid argument
> got: munmap: Invalid argument
>
> I haven't analyzed the problem, but there is an obvious typo in the
> code added since 0.44. Correcting it fixes the error.
>
> ok?
Indeed. Ok!
> diff 9a1d514689bb6e57bb47e4c13630ba38bd650a39 /home/naddy/got
> blob - ca38022c76d7d9781f698cf2f8a68e4314a9e20c
> file + lib/blame.c
> --- lib/blame.c
> +++ lib/blame.c
> @@ -470,9 +470,9 @@ close_file2_and_reuse_file1(struct got_blame *blame)
> if (blame->map2) {
> if (munmap(blame->map2, blame->size2) == -1)
> return got_error_from_errno("munmap");
> blame->map2 = blame->map1;
> - blame->map2 = NULL;
> + blame->map1 = NULL;
>
> }
> blame->size2 = blame->size1;
> blame->size1 = 0;
> --
> Christian "naddy" Weisgerber naddy@mips.inka.de
>
>
got: munmap: Invalid argument