Repository navigation
chore(deps): repin candle 65ecb58 -> c1e6756 + candle-llm -> 3d9fdf0 (upstream Cow::Owned UAF fix) - #222
Merged
Conversation
…(upstream Cow::Owned UAF fix) Bump the workspace candle pin to pick up upstream huggingface/candle#3493 (commit c1e6756a89), the use-after-free fix in as_t_slice / QStorage::from_data(Cow::Owned...) that the sc-9085 quant spike hit: the helper took the Cow by value and returned a slice into its dropped buffer, silently corrupting quantized weights. Our Cow::Borrowed workaround stays (zero-cost), but the footgun is gone at the source. The 4-commit range (65ecb58c..c1e6756a89) is the fix plus three Metal-only SDPA fixes: no API changes, and candle-kernels/ is byte-identical across it, so the sc-7544 vendored fatbin fork needs NO re-vendor (VENDORED.md updated to record the new rev and why). candle-llm re-pinned d0ba3e6 -> 3d9fdf0 in lockstep (candle-llm #46 carries the matching candle bump) so cargo unifies ONE candle-core across the graph; the intermediate d0ba3e6..3d9fdf0 candle-llm churn is the sc-8528 KV-quant backout + docs, and candle-gen-joycaption links no candle-llm symbols. Validation: full CUDA gate (scripts/check-cuda.ps1) green at the new revs on sm_120 - 115 suites, 0 failures, including cuda_quant_smoke (the Blackwell quant-fatbin guard). candle-llm's own CPU suite green in #46. The gate ran against the pre-squash branch commit 1b3bc2f; the squash-merge 3d9fdf0 has the IDENTICAL git tree (543b33bf), so the result carries over exactly. Co-Authored-By: Claude Fable 5 <[email protected]>
michaeltrefry
added a commit
that referenced
this pull request
Jul 2, 2026
…n the repack comment Our pin now carries c1e6756a89 (PR #222), so the workaround framing is stale; Cow::Borrowed stays as free belt-and-suspenders across pin bumps. Co-Authored-By: Claude Fable 5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The sc-9085 quant spike hit an upstream use-after-free in candle at our pin
65ecb58c:QStorage::from_data(Cow::Owned…)routes throughas_t_slice, which took theCowby value and returned a slice into its dropped buffer — silent garbage quantized weights (the borrow checker can't catch it:Cow's lifetime parameter is unconstrained for theOwnedvariant). Upstream fixed it in huggingface/candle#3493 (commitc1e6756a89, 2026-06-18) — eight days after our pin. OurCow::Borrowedworkaround (on the sc-9085 branch) stays regardless, but the footgun is gone at the source for every other future caller.What
candle-core/candle-nn/candle-transformersrev65ecb58c→c1e6756a89faefa888ea57b056394a0619925b87.candle-llmrevd0ba3e6→3d9fdf0in lockstep (candle-llm#46, merged) — its own candle pin had to move too, or the graph materialises TWOcandle-corepackages (same trap as the core-llmbranch=mainunify). Verified: the lock resolves ONE candle at the new rev.candle-kernels/is byte-identical across65ecb58c..c1e6756a89(the range is 4 commits: the UAF fix + three Metal-only SDPA fixes; no API changes).vendor/candle-kernels/VENDORED.mdupdated to record this.Validation
scripts/check-cuda.ps1) green TWICE at the new revs on sm_120 — once standalone and once via the pre-push hook at the final pins: 115 test suites, 0 failures, includingcuda_quant_smoke(the sc-7544 Blackwell quant-fatbin guard: Q4/Q8 QMatMul CPU-vs-CUDA agreement).Follow-ups
3d9fdf0when it takes this candle-gen rev).candle_gen::quantworkaround comment can now cite the upstream fix instead of describing an open bug (fold into sc-9086).🤖 Generated with Claude Code