llama_cpp_for_radxa_dragon_.../tests
James O'Leary c46583b86b
common/parser : fix out_of_range crash in throw path (#20424 regression) (#20777)
* chat : fix out_of_range crash in throw path (#20424 regression)

#20424 introduced effective_input = generation_prompt + input, but the
throw path uses input.substr(result.end) where result.end is a position
within effective_input. Every thinking model with a non-empty
generation_prompt crashes with std::out_of_range instead of the intended
error message.

Test crashes on unpatched master, passes with fix:

  cmake -B build -DLLAMA_BUILD_TESTS=ON -DLLAMA_BUILD_TOOLS=OFF
  cmake --build build --target test-chat
  ./build/bin/test-chat

* Update test-chat.cpp

* Update test-chat.cpp

* Update test-chat.cpp

---------

Co-authored-by: Piotr Wilkin (ilintar) <piotr.wilkin@syndatis.com>
2026-03-20 02:37:22 +01:00
..
peg-parser
.gitignore
CMakeLists.txt
export-graph-ops.cpp
get-model.cpp
get-model.h
gguf-model-data.cpp
gguf-model-data.h
run-json-schema-to-grammar.mjs
test-alloc.cpp
test-arg-parser.cpp
test-autorelease.cpp
test-backend-ops.cpp
test-backend-sampler.cpp
test-barrier.cpp
test-c.c
test-chat-auto-parser.cpp common/parser: add proper reasoning tag prefill reading (#20424) 2026-03-19 16:58:21 +01:00
test-chat-peg-parser.cpp common/parser: add proper reasoning tag prefill reading (#20424) 2026-03-19 16:58:21 +01:00
test-chat-template.cpp
test-chat.cpp common/parser : fix out_of_range crash in throw path (#20424 regression) (#20777) 2026-03-20 02:37:22 +01:00
test-double-float.cpp
test-gbnf-validator.cpp
test-gguf-model-data.cpp
test-gguf.cpp
test-grammar-integration.cpp
test-grammar-llguidance.cpp
test-grammar-parser.cpp
test-jinja.cpp tests : fix test-jinja-py Windows failures by bypassing command-line args [no ci] (#20483) 2026-03-18 10:43:31 +01:00
test-json-partial.cpp
test-json-schema-to-grammar.cpp
test-llama-archs.cpp
test-llama-grammar.cpp
test-log.cpp
test-lora-conversion-inference.sh
test-model-load-cancel.cpp
test-mtmd-c-api.c
test-opt.cpp
test-peg-parser.cpp
test-quantize-fns.cpp
test-quantize-perf.cpp
test-quantize-stats.cpp
test-reasoning-budget.cpp
test-regex-partial.cpp
test-rope.cpp
test-sampling.cpp
test-state-restore-fragmented.cpp
test-thread-safety.cpp
test-tokenizer-0.cpp
test-tokenizer-0.py
test-tokenizer-0.sh
test-tokenizer-1-bpe.cpp
test-tokenizer-1-spm.cpp
test-tokenizer-random.py
test-tokenizers-repo.sh
testing.h