From 0dc9bbf3b6b181d28a8c255aec7020767dc3b9d3 Mon Sep 17 00:00:00 2001 From: Gleb Popov <6yearold@gmail.com> Date: Tue, 11 Nov 2025 10:54:11 +0300 Subject: [PATCH] HugeArray: Use the default constructor to initialize std::span It is invalid to initialize a std::span with nullptr. The code was compiling fine, however, because most compilers do not try to instantiate this template, unless it is called somewhere in the code. --- src/util/HugeAllocator.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/HugeAllocator.hxx b/src/util/HugeAllocator.hxx index 69d7e7af08..1720080af7 100644 --- a/src/util/HugeAllocator.hxx +++ b/src/util/HugeAllocator.hxx @@ -128,7 +128,7 @@ HugeDiscard(void *, size_t) noexcept template class HugeArray { using Buffer = std::span; - Buffer buffer{nullptr}; + Buffer buffer; public: typedef typename Buffer::size_type size_type;