You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In both the searchBaseLayer() and searchBaseLayerST() functions in hnswalg.h, there is a part where neighbors of a vector are loaded, but it seems like there is a slight difference in their behaviors.
In the function searchBaseLayer() (line 274), the type of the vector's ID is defined as tableint (unsigned int):
However, in the function searchBaseLayerST() (line 378), it's defined as int:
After that, candidate_id is used to access visited_array. Since the vector ID is stored in memory as tableint (unsigned int), is there any possibility that a larger unsigned int could be converted to a negative number, causing issues like accessing visited_array[-1]?
The text was updated successfully, but these errors were encountered:
Hey there!
In both the searchBaseLayer() and searchBaseLayerST() functions in hnswalg.h, there is a part where neighbors of a vector are loaded, but it seems like there is a slight difference in their behaviors.
In the function searchBaseLayer() (line 274), the type of the vector's ID is defined as tableint (unsigned int):
However, in the function searchBaseLayerST() (line 378), it's defined as int:
After that, candidate_id is used to access visited_array. Since the vector ID is stored in memory as tableint (unsigned int), is there any possibility that a larger unsigned int could be converted to a negative number, causing issues like accessing visited_array[-1]?
The text was updated successfully, but these errors were encountered: