Hi list, Recently I found a weird bug when there is only 1 UDP local port registered due to our vpp application have special initialize sequence, the sparse_vec_index2 will trigger vpp crash.
By comparing sparse_vec_index2 and sparse_vec_index_internal, it seems sparse_vec_index2 does not properly handle the case when both keep does not stored in the sparse vec. in sparse_vec_index_internal, w = h->is_member_bitmap[i]; > > /* count_trailing_zeros(0) == 0, take care of that case */ > if (PREDICT_FALSE (maybe_range == 0 && insert == 0 && w == 0)) > return 0; > the w == 0 case have been checked and return lookup failed to the caller (return 0). while in the dual loop case, w0 == 0 /w1 == 0 case does not have been checked. It seems only limited code use sparse_vec_index2, so this bug may be not raised that frequently.
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#22556): https://lists.fd.io/g/vpp-dev/message/22556 Mute This Topic: https://lists.fd.io/mt/96802298/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/1480452/21656/631435203/xyzzy [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-