Menu

#317 Bug in trdp_indexedFindSubAddr() (HIGH_PERFORMANCE Mode)

2.0.3.0
closed
None
2020-08-21
2020-02-10
No

In the function trdp_indexedFindSubAddr() in trdp_pdindex.c, first a binary search is performed for an entry with the same comId in the pRcvTableComId which stores all subscribed comId elements in a sorted manner. Because binary search is being used on a table which can have repetitions there might be other better matches possible, hence once a first hit/match is found, a sequential search is then intended to be done for same comId entries after iterating all the way back until the comId is same.

Hence, once a match is found and after traversing all the way back until same comId, a sequential search should be done by iterating over this pRcvTableComId. In this step, there seems to be a problem. After traversing back to the first item, the function trdp_findSubAddr() is re-used for the sequential search. However, trdp_findSubAddr() will perform sequential search by iterating through the linked list (pItem->pNext) in appHandle->pRcvQueue but instead the iteration should be over the pRcvTableComId table. Because the whole context of the search changes, there is a possibility that a better match can indeed go undetected.

Discussion

  • Stefan Bender

    Stefan Bender - 2020-03-23
    • status: open --> accepted
    • assigned_to: Stefan Bender
     
  • Stefan Bender

    Stefan Bender - 2020-03-24
    • status: accepted --> open
     
  • Stefan Bender

    Stefan Bender - 2020-03-24
    • status: open --> accepted
     
  • Bernd Löhr

    Bernd Löhr - 2020-08-07
    • status: accepted --> pending
    • assigned_to: Stefan Bender --> Bernd Löhr
     
  • Bernd Löhr

    Bernd Löhr - 2020-08-21
    • Status: pending --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB