Closed rodarima closed 4 years ago
Last block only contains garbage, but is shown as if it was full:
(gdb) p b
$6 = (pblock_t *) 0x7fff6f400000
(gdb) p l->b
$7 = (struct pblock *) 0x7ffefc000000
(gdb) p l->b->prev
$8 = (struct pblock *) 0x7fff6f400000
(gdb) p l->b->prev[0]
$9 = {{{n = 1024, npacks = 256, nfpacks = 256, next = 0x0, prev = 0x7fff6f600000},
_pad = "\000\004\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\001", '\000' <repeats 16 times>, "`o\377\177", '\000' <repeats 89 times>},
p = 0x7fff6f400080}
(gdb) p l->b->prev->p[0]
$10 = {magic = {3735941133, 3735941133, 3735941133, 3735941133}, i = {1162564, 1162580, 1162596, 1162628}, r = {{47.305835723876953, 28.54927858710289,
23.520331770181656, 33.882113993167877}, {43.183233976364136, 8.1541470587253571, 44.026550322771072, 59.993576109409332}, {0, 0, 0, 0}}, u = {{0, 0,
0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}, E = {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}, B = {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}}
(gdb) p/x l->b->prev->p[0]
$11 = {magic = {0xdeadf00d, 0xdeadf00d, 0xdeadf00d, 0xdeadf00d}, i = {0x11bd44, 0x11bd54, 0x11bd64, 0x11bd84}, r = {{0x2f, 0x1c, 0x17, 0x21}, {0x2b, 0x8,
0x2c, 0x3b}, {0x0, 0x0, 0x0, 0x0}}, u = {{0x0, 0x0, 0x0, 0x0}, {0x0, 0x0, 0x0, 0x0}, {0x0, 0x0, 0x0, 0x0}}, E = {{0x0, 0x0, 0x0, 0x0}, {0x0, 0x0, 0x0,
0x0}, {0x0, 0x0, 0x0, 0x0}}, B = {{0x0, 0x0, 0x0, 0x0}, {0x0, 0x0, 0x0, 0x0}, {0x0, 0x0, 0x0, 0x0}}}
Is this a corner case?
Looks like is a corner case:
. . . . . . B is now at ip=2 gip=14594 b=0x7fff6f400000
. . . . . . B: cleaning ppack at ip=2
. . . . . . B: moving to the previous ppack
. . . . . . B is now at ip=1 gip=14593 b=0x7fff6f400000
. . . . . . B: cleaning ppack at ip=1
. . . . . . B: moving to the previous ppack
. . . . . . B is now at ip=0 gip=14592 b=0x7fff6f400000
. . . . . . B: cleaning ppack at ip=0
. . . . . . B: enabled=4
. . . . . . B: 11 particles out
. . . . . . --- produce_extra_B ends ---
. . . . . . --- produce_holes_A begins ---
. . . . . . A: 0 particles out
. . . . . . --- produce_holes_A ends ---
. . . . . . --- fill_holes begins ---
. . . . . . 1 holes filled
. . . . . . --- fill_holes ends ---
. . . . . . --- produce_extra_B begins ---
. . . . . . B is at ip=0 gip=14592 b=0x7fff6f400000
. . . . . . B: moving to the previous ppack
. . . . . . B: cannot step anymore, stop
. . . . . . B: enabled=0
. . . . . . B: 0 particles out
. . . . . . --- produce_extra_B ends ---
. . . . . . --- produce_holes_A begins ---
. . . . . . A: cannot step anymore, stop
. . . . . . A: 0 particles out
. . . . . . --- produce_holes_A ends ---
...
(gdb) p l->nblocks * l->max_packs
$12 = 14592
Hypothesis:
In remod_end we are returning the REMOVE window, but then considering the w->b of the remove window to be the last block of the list. The MODIFY window, which is full, must be used instead.