]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
common: Intentionally leak logger instance to fix hanging on Windows (#22273)
authorMasato Nakasaka <redacted>
Wed, 29 Apr 2026 07:58:43 +0000 (16:58 +0900)
committerGitHub <redacted>
Wed, 29 Apr 2026 07:58:43 +0000 (10:58 +0300)
commit7b95ea5d110241cf8b0fb6936927387f63f18a32
tree4777e78d9f794d34f44aa544b7431746e78e49aa
parentbdc9c743a5f118f8559d58a827dd848592b1f70f
common: Intentionally leak logger instance to fix hanging on Windows  (#22273)

* Changed to leak logger singleton to prevent hanging on Windows

* Fix comment

* Stopped using static vector

Using std::vector will cause g_col to be released before the logger thread exits, causing the logger thread to touch freed memory causing a crash

* Change so all logs are output before exit

* Added debug logging

* added more logging

* Added logging

* Explicitly free logger to avoid hanging on Win

* Reverted to leak logger instance again

* Removed debug log and fixed comment

* Fixed comment

---------

Co-authored-by: Georgi Gerganov <redacted>
common/log.cpp
common/log.h
tests/test-log.cpp