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

From:
Christian Weisgerber <naddy@mips.inka.de>
Subject:
got: munmap: Invalid argument
To:
gameoftrees@openbsd.org
Date:
Sat, 28 Nov 2020 17:54:12 +0100

Download raw body.

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

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