Re: Beta3 core dump

From: Jun Kuriyama <kuriyama_at_imgsrc.co.jp>
Date: Mon, 13 Sep 2004 23:41:43 +0900
At Sun, 12 Sep 2004 00:27:17 +0900,
kuriyama wrote:
> > Just so you're clear on what I'm doing.  I made the code change, then in
> > /usr/src/lib/libc I do a 'make' then a 'make install', then I do a
> > 'portsdb -fu'.
> 
> Thanks.  My patch fixes 3 boxes in my office, but I find next one
> still dumps core even with patch.  I'll dig into more...

Okay, I find NetBSD has already fixes for this.  Please test with this
patch if you still have problem with "portsdb -u".


==== //depot/user/kuriyama/ref5/src/lib/libc/db/btree/bt_split.c#3 - /home/kuriyama/p4/kuriyama/ref5/src/lib/libc/db/btree/bt_split.c ====
_at__at_ -355,8 +355,6 _at__at_
 	/* Put the new right page for the split into place. */
 	if ((r = __bt_new(t, &npg)) == NULL)
 		return (NULL);
-	/* XXX: Workaround for broken page data. */
-	memset(r, 0xff, t->bt_psize);
 	r->pgno = npg;
 	r->lower = BTDATAOFF;
 	r->upper = t->bt_psize;
_at__at_ -728,7 +726,7 _at__at_
 	 * the right page.
 	 */
 	if (skip <= off) {
-		skip = 0;
+		skip = MAX_PAGE_OFFSET;
 		rval = l;
 	} else {
 		rval = r;
_at__at_ -738,7 +736,7 _at__at_
 	for (off = 0; nxt < top; ++off) {
 		if (skip == nxt) {
 			++off;
-			skip = 0;
+			skip = MAX_PAGE_OFFSET;
 		}
 		switch (h->flags & P_TYPE) {
 		case P_BINTERNAL:


-- 
Jun Kuriyama <kuriyama_at_imgsrc.co.jp> // IMG SRC, Inc.
             <kuriyama_at_FreeBSD.org> // FreeBSD Project
Received on Mon Sep 13 2004 - 12:41:47 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:11 UTC