llama.cpp
04f7226a - server : escape the special tokens without std::regex (#30243)

Commit
4 days ago
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-".
Author
Parents
Loading