From 1eac7026fb496acdf24171192468b91afe99cc8b Mon Sep 17 00:00:00 2001 From: litan1 <106347144+ltan1ms@users.noreply.github.com> Date: Tue, 1 Aug 2023 12:03:53 -0700 Subject: [PATCH] Pass nullptr as nullT when creating thread_data that's of ConcurrentQueue type, otherwise the default null_T is uninitialized, could point to arbitraty memory (#408) --- src/pq_flash_index.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pq_flash_index.cpp b/src/pq_flash_index.cpp index 70431ded6..5bd23ecb0 100644 --- a/src/pq_flash_index.cpp +++ b/src/pq_flash_index.cpp @@ -41,7 +41,7 @@ namespace diskann template PQFlashIndex::PQFlashIndex(std::shared_ptr &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) {