In faiss/utils/AlignedTable.h, in the class AlignedTableTightAlloc, we can see from the function resize that the pointer member ptr may be set to null. The copy constructor has taken this into consideration and has performed a check if (numel > 0) before passing ptr to memcpy (which was added in 74ee67a). However, the function clear does not seem to have realized this.
Maybe a check should also be performed in clear before calling memset?
In
faiss/utils/AlignedTable.h, in the classAlignedTableTightAlloc, we can see from the functionresizethat the pointer memberptrmay be set to null. The copy constructor has taken this into consideration and has performed a checkif (numel > 0)before passingptrtomemcpy(which was added in 74ee67a). However, the functioncleardoes not seem to have realized this.Maybe a check should also be performed in
clearbefore callingmemset?