Skip to content

Commit

Permalink
Pass nullptr as nullT when creating thread_data that's of ConcurrentQ…
Browse files Browse the repository at this point in the history
…ueue<SSDThreadData*> type, otherwise the default null_T is uninitialized, could point to arbitraty memory (#408)
  • Loading branch information
ltan1ms authored Aug 1, 2023
1 parent 44445de commit 1eac702
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pq_flash_index.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ namespace diskann

template <typename T, typename LabelT>
PQFlashIndex<T, LabelT>::PQFlashIndex(std::shared_ptr<AlignedFileReader> &fileReader, diskann::Metric m)
: reader(fileReader), metric(m)
: reader(fileReader), metric(m), thread_data(nullptr)
{
if (m == diskann::Metric::COSINE || m == diskann::Metric::INNER_PRODUCT)
{
Expand Down

0 comments on commit 1eac702

Please sign in to comment.