I found something strange inside proc_alignments_core(), and I am not sure if this is a bug. In wtdbg.h:1385 inside proc_alignments_core(), we can see the slice size ic is ceiling of size/num_index, where num_index is pass down from --kbm-parts
In wtdbg.h:1453 we can find a for loop iterate through each slice. However, ie = ic*num_index in the last slice. Since ic is the ceiling of size/num_index, so this might exceed the original size. Furthermore, kbm->bins->buffer is large enough so the exceeded index would not cause a segmentation fault but g->kbm->bins->buffer[ie - 1].ridx would give out 0, so we got qb=qe=0 in the last slice. Finally, the thread_mdbg_func would not run if qb=qe=0.
Dear @ruanjue ,
I found something strange inside proc_alignments_core(), and I am not sure if this is a bug. In wtdbg.h:1385 inside proc_alignments_core(), we can see the slice size
ic
is ceiling of size/num_index, wherenum_index
is pass down from--kbm-parts
In wtdbg.h:1453 we can find a for loop iterate through each slice. However, ie = ic*num_index in the last slice. Since
ic
is the ceiling of size/num_index, so this might exceed the original size. Furthermore,kbm->bins->buffer
is large enough so the exceeded index would not cause a segmentation fault butg->kbm->bins->buffer[ie - 1].ridx
would give out 0, so we gotqb=qe=0
in the last slice. Finally, thethread_mdbg_func
would not run ifqb=qe=0
.Please check if I have some misunderstanding on this part.
Thank and best regards, Frank Lin