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

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: got: munmap: Invalid argument
To:
Christian Weisgerber <naddy@mips.inka.de>
Cc:
gameoftrees@openbsd.org
Date:
Sat, 28 Nov 2020 18:39:32 +0100

Download raw body.

Thread
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
> 
>