Commit graph

2 commits

Author SHA1 Message Date
Yuri Khrustalev
04f7226a2c
server : escape the special tokens without std::regex (#30243)
The d1-omni and kev prompts escape "<|name|>" in the request text with
std::regex_replace. libstdc++ recurses for each char of the name, so a
state of "<|" and 30000 letters overflows the stack of the HTTP thread
and llama-server dies with SIGSEGV.

server_decision_escape_special_tokens() writes the same text with a loop.
test-server-component compares it with the regex on every string of up to
6 chars of "<|>a-".
2026-10-14 01:17:11 +02:00
Xuan-Son Nguyen
62a6f74bab
server: add component tests (#30312)
* server: add component tests

* nits

* add codeowners
2026-10-11 12:51:07 +02:00