Repository navigation
[skia-sync] Merge upstream chrome/m151 bug fixes - #4382
Merged
Merged
Conversation
Automated same-milestone bug-fix sync. Pulls the single new upstream commit on chrome/m151 (a Use-After-Free fix in SubRunAllocator) into mono/skia's skiasharp branch and advances the submodule pointer here. - externals/skia submodule: 98877992a5 -> ff9099d996 (new merge commit) - cgmanifest.json commitHash + upstream_merge_commit updated - chrome_milestone unchanged (151) - No version bump (CURRENT == TARGET == 151) - No C API impact, zero binding diff, no C# code changes - Native build (Linux x64) + full test suite (5614 passed, 0 failed) verified Co-authored-by: Copilot <[email protected]>
Contributor
📦 Try the packages from this PRWarning Do not run these scripts without first reviewing the code in this PR. Step 1 — Download the packages bash / macOS / Linux: curl -fsSL https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.sh | bash -s -- 4382PowerShell / Windows: iex "& { $(irm https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.ps1) } 4382"Step 2 — Add the local NuGet source dotnet nuget add source ~/.skiasharp/hives/pr-4382/packages --name skiasharp-pr-4382More options
Or download manually from Azure Pipelines — look for the Remove the source when you're done: dotnet nuget remove source skiasharp-pr-4382 |
Contributor
|
📖 Documentation Preview The documentation for this PR has been deployed and is available at: 🔗 View Staging Site This preview will be updated automatically when you push new commits to this PR. This comment is automatically updated by the documentation staging workflow. |
mattleibow
marked this pull request as ready for review
July 10, 2026 20:42
mattleibow
added a commit
to mono/skia
that referenced
this pull request
Jul 10, 2026
[skia-sync] Merge upstream chrome/m151 bug fixes (#282) Upstream CL: https://skia-review.googlesource.com/c/skia/+/1288616 Original CL: https://skia-review.googlesource.com/c/skia/+/1284796 Bug: skia:530646115 / Chromium 532103445 Upstream commit: google/skia@0208108c7a (cherry-pick of 014a77e) Merge one new bug-fix commit from chrome/m151 into the skiasharp branch: * 0208108 [M151] Fix Use-After-Free in SubRunAllocator Deserializing a corrupt Slug buffer (SlugImpl::MakeFromBuffer) returns nullptr early, destroying the temporary std::tuple result of SubRunAllocator::AllocateClassMemoryAndArena. Because tuple member destruction order is unspecified, SubRunInitializer freed the backing memory before ~BagOfBytes in the SubRunAllocator read fEndByte from it -- a use-after-free read followed by a wild-free/double-free. Upstream replaces the tuple with a plain struct (AllocateAndArenaResult) that declares the allocator so it is destroyed before the initializer frees the memory, and moves SubRunInitializer onto a std::unique_ptr with a custom deleter to make the ownership transfer explicit. This is the same fix already merged to release/4.150.x in #281, now cherry-picked to m151. Internal C++ only: the single changed file is src/text/gpu/SubRunAllocator.h. It touches no include/c or src/c file, so there is no C API or SkiaSharp binding impact. Clean automatic merge, no conflicts. Companion SkiaSharp PR: mono/SkiaSharp#4382. Co-authored-by: Arthur Sonzogni <[email protected]>
mono/skia#282 was squash-merged into the skiasharp branch, so the two-parent merge commit ff9099d996 no longer exists there. Point the submodule and cgmanifest.json commitHash at the squash commit cd6e926914 (current tip of mono/skia skiasharp). chrome_milestone (151) and upstream_merge_commit (0208108c7a) are unchanged -- no new upstream code was merged, only the mono/skia commit SHA changed as a result of the squash. Co-authored-by: Copilot App <[email protected]>
mattleibow
added a commit
that referenced
this pull request
Jul 12, 2026
#4410) Fix release-notes classifier that mis-tagged skia-sync PRs as internal (#4410) The release-notes generator (scripts/infra/docs/release-notes-data.py) tags every merged PR product / mixed / internal by the files it touched, so the Polish phase can focus on product changes. Automated [skia-sync] submodule bumps — which change the shipped native Skia — kept coming out `internal` and being dropped from the notes (e.g. #4382 in 4.151.0-unreleased and #4262 in 4.148.1-unreleased were tagged internal despite both bumping externals/skia). ~~ Root cause ~~ _files_by_commit() runs `git log --format=%x1e%H --name-only` and parsed each record by matching a leading \x1e per line. But run() returns stdout.strip(), and \x1e (the record separator) is whitespace to Python's str.strip(), so the leading \x1e on the first record was stripped off. git log lists commits newest-first, so that first, separator-less record is the newest commit in the range — very often the latest [skia-sync] bump. The startswith("\x1e") check then missed it, its file list was dropped, and an empty file set falls through to `internal`. Parse by splitting on \x1e instead, which recovers every record regardless of the stripped leading separator. ~~ Sharpen the path tiers ~~ While auditing which paths count as what: * product stays the strong signal — binding/ + source/ (managed API & Views) and externals/skia (the native Skia submodule, with its vendored HarfBuzz). The prefix is exact `externals/skia`, not `externals/`, so it no longer sweeps in the sibling externals/depot_tools build toolchain or externals/.gitignore. * native/ (per-platform build config) shapes the shipped binaries, so it is not internal, but a native/-only PR is usually infra rather than an API/behaviour change — so it is `mixed` (Polish judges from the title). Covers the shipped WinUI native subtree under native/winui/ too. * docs (the mono/SkiaSharp-API-docs submodule, mdoc XML that ships as IntelliSense docs) moves up from internal to `mixed`. A bump appears in the parent as the bare `docs` gitlink, so the prefix is slash-less and does not collide with documentation/ (the docs site, which stays internal). ~~ Make the mapping data-driven ~~ The path→tag mapping is no longer hardcoded in the script. It lives in the committed scripts/infra/docs/release-notes-paths.json — ordered tiers (tag + patterns) plus a default — the single deterministic place to edit it. _pr_category loads the tiers (cached) and returns the first tier with a matching file, else the default. Patterns match by prefix (str.startswith, unchanged behaviour) or, when they contain a glob metacharacter (* ? [), by fnmatch.fnmatchcase — so paths, prefixes, and wildcards are all supported. A missing/malformed config is a hard error, never a silent fallback to a guessed mapping. Behaviour is identical to the previous hardcoded tuples, verified across the prefix cases and the real sync/docs/depot_tools PRs. Committed data.json files self-correct as pages regenerate on the next prepare run; no data.json format bump. The behaviour spec (documentation/dev/release-notes-and-api-diffs.md) and the release-notes SKILL.md are updated to match, including the new config file in the inventory. Co-authored-by: Matthew Leibowitz <[email protected]> Co-authored-by: Copilot App <[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.
Automated upstream bug-fix sync for m151.
Companion skia PR: mono/skia#282
Automated upstream bug-fix sync for m151. Targets
main(mono/skiaskiasharp).[skia-sync] Merge upstream chrome/m151 bug fixes — mono/SkiaSharp
Base branch:
mainHead branch:
skia-sync/m151Mode: same-milestone bug-fix sync (
CURRENT == TARGET == m151,IS_RELEASE == false)Companion mono/skia PR:
[skia-sync] Merge upstream chrome/m151 bug fixesonskia-sync/m151(submodule pointer advanced to reflect it)Breaking-change analysis
None. Only one new upstream commit was pulled in
(
0208108c7a [M151] Fix Use-After-Free in SubRunAllocator), and it is a pureinternal C++ fix in
src/text/gpu/SubRunAllocator.h— it changes thedestruction order of an internal allocator return type from
std::tupleto acustom struct.
No C API impact (
grep SubRunAllocator src/c/ include/c/returns nothing), noheader changes reachable from
include/c/*.h, no binding regeneration delta.This is the same fix that already landed on
chrome/m150and was pulled intoour fork on the
release/4.150.xbranch (companion sync PRsmono/skia#281 /
mono/SkiaSharp#4379); it has now
been cherry-picked to
chrome/m151upstream and is being brought into themainline here.Version / binding updates
No version bump — this is a same-milestone sync, so
scripts/VERSIONS.txtand
scripts/azure-templates-variables.ymlare untouched (verified:git diffon both files is empty after running the Phase 6 script with
-Current 151 -Target 151 -UpstreamRef chrome/m151).cgmanifest.json:commitHash:98877992a5…→ff9099d996…(new mono/skia merge commit)upstream_merge_commit:1536d39750…→0208108c7a…(new upstream tip)chrome_milestone:151(unchanged)externals/skiasubmodule pointer:98877992a5→ff9099d996(points atthe new merge commit on
skia-sync/m151).C# changes
None. Binding regeneration (
pwsh .agents/skills/update-skia/scripts/regenerate-bindings.ps1) produced zerodiff across
binding/SkiaSharp/SkiaApi.generated.csand theSkottie/SceneGraph/Resources generated files. The Phase 9 new-function check
(
git diff origin/main -- binding/SkiaSharp/SkiaApi.generated.cs | grep '^+.*internal static')returned zero matches, so no C# wrappers need to be added.
Build & test results (Linux x64)
dotnet cake --target=externals-linux --arch=x64)dotnet build binding/SkiaSharp/SkiaSharp.csproj)SkiaSharp.Tests.Consoletests)Both native artifacts produced as expected:
output/native/linux/x64/libSkiaSharp.so→libSkiaSharp.so.151.0.0(11 MB — soname 151.0.0 = our tracked milestone)output/native/linux/x64/libHarfBuzzSharp.so→libHarfBuzzSharp.so.0.61421.0(2.8 MB)Full test log uploaded as
test-output.txtworkflow artifact.Items needing human attention
None. This is a minimal internal C++ bug fix from upstream Skia's m151 branch
with:
Only Linux x64 was built and tested in this automated sync — macOS, Windows,
iOS, Android, WASM, and Tizen are covered by the normal CI matrix on the PR.
Companion mono/skia PR
The submodule now points at commit
ff9099d996on theskia-sync/m151branchof
mono/skia. That PR must merge first; then this PR's submodule pointer willbe re-fetched to the squashed SHA before merging here.
Created by skia-upstream-sync.
Created by skia-upstream-sync.