Skip to content

Commit 1eac702

Browse files
authored
Pass nullptr as nullT when creating thread_data that's of ConcurrentQueue<SSDThreadData*> type, otherwise the default null_T is uninitialized, could point to arbitraty memory (#408)
1 parent 44445de commit 1eac702

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pq_flash_index.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ namespace diskann
4141

4242
template <typename T, typename LabelT>
4343
PQFlashIndex<T, LabelT>::PQFlashIndex(std::shared_ptr<AlignedFileReader> &fileReader, diskann::Metric m)
44-
: reader(fileReader), metric(m)
44+
: reader(fileReader), metric(m), thread_data(nullptr)
4545
{
4646
if (m == diskann::Metric::COSINE || m == diskann::Metric::INNER_PRODUCT)
4747
{

0 commit comments

Comments
 (0)