Skip to content

Upgrade llama.cpp b11062 → b11069; drop patch 0011 - #443

Merged
bernardladenthin merged 1 commit into
mainfrom
claude/brave-curie-q3qeu2
Sep 21, 2026
Merged

bernardladenthin merged 1 commit into
mainfrom
claude/brave-curie-q3qeu2

Conversation

@bernardladenthin

@bernardladenthin bernardladenthin commented Sep 21, 2026

Copy link
Copy Markdown
Owner

Summary

  • Upgrade llama.cpp from b11062 to b11069 (7 upstream commits, 57 KiB). The pinned version is updated in CMakeLists.txt, CLAUDE.md, README.md, and Java version constants.
  • Drop local patch 0011 (lenient invalid-UTF-8 handling in PEG parser). Upstream llama.cpp #29161 (first tagged b11063) fixed the same issue independently and more broadly: instead of truncating at the bad byte, it now replaces each undecodable run with exactly one U+FFFD (Unicode "maximal subpart" rule) and preserves text after it.
  • Update ContentOnlyParseUtf8 C++ tests to pin upstream's replacement contract: malformed bytes are now replaced with U+FFFD rather than causing truncation. A trailing incomplete sequence at EOF is still withheld (not replaced), as before.

Behavioral change

Before (patch 0011): A lone continuation byte \x80 in "Hello\x80World" would parse as "Hello" (truncated).

After (upstream ggml-org/llama.cpp#29161): The same input now parses as "Hello\uFFFDWorld" (replaced + text after preserved). Two adjacent invalid bytes \xFF\xFE become two separate U+FFFD replacements, not one.

The fix is broader than the patch: it handles the invalid-UTF-8 case at the AST level (recording undecodable runs on nodes) rather than just at the parse-result level, so common_chat_peg_mapper can emit sanitized text for every node.

Test plan

  • ContentOnlyParseUtf8 C++ tests updated and passing (4 tests covering lone continuation byte, truncated sequence, invalid lead byte, adjacent invalid bytes, and incomplete trailing sequence)
  • All other patches (0001–0010, 0012) apply unchanged; no project-source changes outside tests
  • CI is green on this branch

Related issues / PRs

Checklist

  • I have read CONTRIBUTING.md and CODE_OF_CONDUCT.md
  • My commits follow Conventional Commits
  • No security-sensitive changes

https://claude.ai/code/session_01TCpJSw2Qi3H5b51vquYrEH

Seven upstream commits, 57 KiB, no project-source change. tools/server/,
common/arg.*, src/llama-model.* and ggml/include are byte-identical across
the range, so the server wire contract cannot have moved and eight of the
nine local patches apply unchanged.

Drop patches/0011 (lenient invalid UTF-8 in the PEG parser): upstream
#29161 (first tagged b11063) fixed the same defect independently and more
broadly. The until-parser now consumes every undecodable run and
common_chat_peg_mapper emits one U+FFFD per run with the text after it
kept, where the patch returned only the text up to the bad byte. The hunk
the patch modified no longer exists, so the applier failed loud and the
patch is dropped rather than refreshed, per the 0009/0013 precedent.

Re-point the ContentOnlyParseUtf8 guard in test_utils.cpp at upstream's
replacement contract (six cases; the new one pins the run boundary), so a
future revert to FAIL still reds C++ Tests on every platform. Record the
drop in CLAUDE.md, TODO.md, CHANGELOG.md, the verify-patches-applied.sh
header and the breaking-changes history.

Verified from a fresh configure: 8 patches stamped at 68d9053af, ctest
552/552, 40 Java_* exports / 0 mangled, NativeLibraryLoadSmokeTest 4/4.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TCpJSw2Qi3H5b51vquYrEH
@bernardladenthin
bernardladenthin merged commit 97826fc into main Sep 21, 2026
9 of 15 checks passed
@bernardladenthin
bernardladenthin deleted the claude/brave-curie-q3qeu2 branch September 21, 2026 10:46
@sonarqubecloud

Copy link
Copy Markdown

This branch had an error being deployed

1 failed deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants