Skip to content

docs: record upstream status of patches 0001 and 0009 - #374

Merged
bernardladenthin merged 1 commit into
mainfrom
docs/upstream-patch-status
Aug 1, 2026
Merged

docs: record upstream status of patches 0001 and 0009#374
bernardladenthin merged 1 commit into
mainfrom
docs/upstream-patch-status

Conversation

@bernardladenthin

Copy link
Copy Markdown
Owner

Refresh patch 0009 to match sheredom/subprocess.h#104 at 620ce44, which added the overridable SUBPROCESS_HAVE_CWD detection. Verified to apply cleanly to the vendored header and to reproduce that head byte for byte, so the applier will skip it once the pin is bumped.

Add the upstream-facing write-up for patch 0001, including a reproducer that makes llama.cpp's own test-arg-parser fail on unmodified master.

Assisted-by: Claude Opus 5

Summary

Test plan

  • Affected unit / integration tests pass locally
  • CI is green on this branch
  • Docs / CHANGELOG updated where applicable

Related issues / PRs

Checklist

  • I have read CONTRIBUTING.md and CODE_OF_CONDUCT.md
  • My commits follow Conventional Commits
  • No security-sensitive changes (if there are, I have notified the maintainer privately per SECURITY.md)

Refresh patch 0009 to match sheredom/subprocess.h#104 at 620ce44, which added
the overridable SUBPROCESS_HAVE_CWD detection. Verified to apply cleanly to the
vendored header and to reproduce that head byte for byte, so the applier will
skip it once the pin is bumped.

Add the upstream-facing write-up for patch 0001, including a reproducer that
makes llama.cpp's own test-arg-parser fail on unmodified master.

Assisted-by: Claude Opus 5
@bernardladenthin
bernardladenthin merged commit 9e0f7c6 into main Aug 1, 2026
8 of 14 checks passed
@bernardladenthin
bernardladenthin deleted the docs/upstream-patch-status branch August 1, 2026 20:15
@claude

claude Bot commented Aug 1, 2026

Copy link
Copy Markdown

Review complete: PR #374 documentation updates look good.

The new upstream-investigation-win32-argv-substitution.md document is well-researched and comprehensive. Patch 0009 now matches upstream submission sheredom/subprocess.h#104 exactly.

Minor notes:

  • CLAUDE.md line 580: Patch 0001 description could clarify its active use status and timeline for removal
  • New doc line 41: Date reference may need context for future readers

Overall: Strong documentation work with no code quality or security issues. Ready for review approval.


Origin of the code:

- PR [#24779](https://github.com/ggml-org/llama.cpp/pull/24779) - `mtmd, arg: fix utf8 handling on windows`, merged 2026-06-19 by @ngxson

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ This date (2026-06-19) appears to be in the future. While this is a historical upstream reference, it may confuse readers. Consider adding a note that this is when PR #24779 was merged upstream, or verify the actual merge date is correct.

Comment thread TODO.md
@@ -107,7 +108,9 @@ upstream PR #22393 — it drops automatically when that merges.)
- **`0008` `LLAMA_SERVER_WORKER_CMD` router worker override** (also useful for containerized/wrapped
deployments).
- **`0009` guard `posix_spawn_file_actions_addchdir_np` on old glibc** (b10154 cross-compile break on

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Good clarification that patch 0009 now covers both manylinux2014 (glibc 2.17) AND manylinux_2_28 (glibc 2.28). The note that it's byte-identical to upstream #104 and will auto-drop when llama.cpp bumps the pin is helpful for future maintenance.

+/* Whether subprocess_create_ex can honour process_cwd. glibc only gained
+ posix_spawn_file_actions_addchdir_np in 2.29. Define this yourself to
+ override the detection, for instance on musl older than 1.1.24. */
+#if !defined(SUBPROCESS_HAVE_CWD)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Good improvement: The new macro name SUBPROCESS_HAVE_CWD is clearer and more intuitive than SUBPROCESS_HAVE_ADDCHDIR_NP. The guard allowing callers to override the detection (#if !defined(SUBPROCESS_HAVE_CWD)) is a solid defensive design pattern for platform compatibility.

@sonarqubecloud

sonarqubecloud Bot commented Aug 1, 2026

Copy link
Copy Markdown

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.

1 participant