From: Xuan-Son Nguyen Date: Thu, 18 Dec 2025 13:30:32 +0000 (+0100) Subject: arg: fix ASAN error on sampler_type_names empty (#18167) X-Git-Tag: upstream/0.0.7599~127 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=4d1316c440e7ee7b854423aea8db6ffcd92caeaf;p=pkg%2Fggml%2Fsources%2Fllama.cpp arg: fix ASAN error on sampler_type_names empty (#18167) --- diff --git a/common/arg.cpp b/common/arg.cpp index b6d16168..4a0ec656 100644 --- a/common/arg.cpp +++ b/common/arg.cpp @@ -873,7 +873,9 @@ common_params_context common_params_parser_init(common_params & params, llama_ex sampler_type_chars += common_sampler_type_to_chr(sampler); sampler_type_names += common_sampler_type_to_str(sampler) + ";"; } - sampler_type_names.pop_back(); + if (!sampler_type_names.empty()) { + sampler_type_names.pop_back(); // remove last semicolon + } /**