Closed ltan1ms closed 5 months ago
This fix the issue where when max_points passed is 0, it should use 1 to align with the logic in the other class constructor it calls into: https://github.com/microsoft/DiskANN/blob/main/src/index.cpp#L67-L69
Otherwise, the code will assume the underlying in memory block has 1 more than actual capacity and causes memory heap corruption as seen in my debugging:
" it should use 1" -- for which variable?
oops, there was a typo in my PR description. it's the "max_points"
Reference Issues/PRs
What does this implement/fix? Briefly explain your changes.
This fix the issue where when max_points passed is 0, it should use 1 to align with the logic in the other class constructor it calls into: https://github.com/microsoft/DiskANN/blob/main/src/index.cpp#L67-L69
Otherwise, the code will assume the underlying in memory block has 1 more than actual capacity and causes memory heap corruption as seen in my debugging:![ac8915f4-0d7d-47a8-8314-9c81bc093da8](https://github.com/microsoft/DiskANN/assets/106347144/94783158-d912-423e-ad16-5bf21e598057)
Any other comments?