From: Stefan Sperling Subject: Re: got-build-regress.sh regress failure To: gameoftrees@openbsd.org Date: Tue, 14 Jun 2022 20:53:13 +0200 On Tue, Jun 14, 2022 at 07:13:41PM +0200, stsp@stsp.name wrote: > got-build-regress.sh for branch 'main' on Tue Jun 14 16:00:02 UTC 2022 > ==== update ==== > ./update.sh -q -r "/tmp" > got-read-pack(52863) in free(): write after free 0x703d65d0 > gotadmin: privsep peer process closed pipe > got-read-pack(14354) in free(): write after free 0x8278c780 > gotadmin: privsep peer process closed pipe > gotadmin: privsep peer process closed pipe I have just committed the fix below which seems to make these errors disappear. diff 975f71a9de00575ee9f5a1531e9edfeac994a2c3 94a5f5170bd57246a0123938c6ec2aba2757be43 blob - 17f1fc1cc94a1d35ab873bd4b25914da0d483828 blob + b44da731e3f97a02e260e506da2bb6f539a82c8d --- libexec/got-read-pack/got-read-pack.c +++ libexec/got-read-pack/got-read-pack.c @@ -1374,7 +1374,7 @@ enumeration_request(struct imsg *imsg, struct imsgbuf STAILQ_INIT(&commit_ids); - trees = calloc(1, nalloc); + trees = calloc(nalloc, sizeof(*trees)); if (trees == NULL) return got_error_from_errno("calloc");