From cd57ab6ad96527c2f0b0464fd6d5d34efabee479 Mon Sep 17 00:00:00 2001 From: SChernykh Date: Tue, 23 May 2023 19:14:15 +0200 Subject: [PATCH] Fixed `UV_THREADPOOL_SIZE` setting putenv can't use stack buffer --- src/log.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/log.cpp b/src/log.cpp index 0fec053..d2c9aab 100644 --- a/src/log.cpp +++ b/src/log.cpp @@ -174,7 +174,7 @@ private: const uint32_t N = std::min(std::max(std::thread::hardware_concurrency(), 4U), 8U); - char buf[40] = {}; + static char buf[40] = {}; log::Stream s(buf); s << "UV_THREADPOOL_SIZE=" << N << '\0';