I found "portsdb -u" dumps core with recent INDEX file, and this is
caused by refering broken (uninitialized?) pointer which is retrieved from __bt_new() (and from mpool_new()). I don't know why this linp[0] is read before stored because this should be controlled by .lower and .upper member of PAGE structure which are correctly initialized. But this workaround fixes the problem on my environment and this module has #ifdef PURIFY option which initializes new and reused memory from mpool by memset(p, 0xff, size) like as I did. Please feel free to fix the real bug instead of my workaround.
This commit is contained in:
parent
262a2524e0
commit
46e872d3e6
@ -361,6 +361,8 @@ bt_page(t, h, lp, rp, skip, ilen)
|
||||
r->nextpg = h->nextpg;
|
||||
r->prevpg = h->pgno;
|
||||
r->flags = h->flags & P_TYPE;
|
||||
/* XXX: Workaround for broken page data access. */
|
||||
r->linp[0] = 0xffff;
|
||||
|
||||
/*
|
||||
* If we're splitting the last page on a level because we're appending
|
||||
|
Loading…
x
Reference in New Issue
Block a user