Repository navigation
ref: Record that Android assembly store v4 never shipped - #5609
Merged
jamescrosswell merged 1 commit intoSep 23, 2026
Merged
jamescrosswell merged 1 commit into
jamescrosswell merged 1 commit into
Conversation
dotnet/android#12780 removed the opt-in decompression cache and restored assembly store format version 3 for CoreCLR, so v4 only ever existed in .NET 11 previews. Correct the vendored file headers and ATTRIBUTION, which claimed v4 ships in .NET 11. .NET 11 GA emits v3 with CoreCLR's 32-bit CRC32 name hashes on 64-bit ABIs - a shape the synthetic store tests did not cover. Add it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## feat/assemblystore-index-sizing #5609 +/- ##
===================================================================
- Coverage 74.90% 74.80% -0.11%
===================================================================
Files 515 515
Lines 18916 18916
Branches 3693 3693
===================================================================
- Hits 14169 14150 -19
- Misses 3872 3890 +18
- Partials 875 876 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
jamescrosswell
marked this pull request as ready for review
September 23, 2026 23:11
jamescrosswell
merged commit Sep 23, 2026
79b8f74
into
feat/assemblystore-index-sizing
41 of 42 checks passed
jamescrosswell
added a commit
that referenced
this pull request
Oct 6, 2026
* feat: Accept Android assembly store v4 versions and read content_id header v4 stores (CoreCLR, .NET 11) add a content_id field to the header, so the index starts 8 bytes later. Header.NativeSize is now derived from the format number rather than being a constant. Refs #5454 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * feat: Decompress Zstandard-compressed Android assemblies .NET 11 compresses assemblies with Zstandard (XAZS) instead of LZ4 (XALZ). The 12-byte header is unchanged, so only the magic and the codec differ. Zstandard uses the BCL ZstandardDecoder on net11.0; the net10.0 build throws NotSupportedException, since only .NET 11 apps produce XAZS. Refs #5346 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * Accept API verifier changes * Accept API verifier changes * feat: Derive Android assembly store index entry size from the header The index entry layout was inferred from the ABI bitness (plus a compile-time TFM check for the ignore flag). CoreCLR v4 stores use 32-bit CRC32 name hashes on every ABI, so on 64-bit ABIs the reader read the index 4 bytes per entry too far and failed in Prepare(). The entry size is now index_size / index_entry_count, and anything other than the two v3/v4 layouts is rejected as corrupt. With this, .NET 11 APKs are readable, so the net11 APK tests are re-enabled. Refs #5454 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * chore: Refresh Android assembly reader upstream attribution Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * test: Don't compile ArchiveUtilsTests for Android Assembly.Location is empty on Android, so the static initializer threw and every test in the class failed on the device runs. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * chore: Trim comments Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * fix: Resolve debug images for Android assemblies without a file location On .NET 11 (CoreCLR) Android, assemblies loaded from the assembly store report Module.FullyQualifiedName as <Unknown>, so DebugStackTrace bailed out before calling the assembly reader and events had no debug images. When an assembly reader is configured, fall back to Module.ScopeName, which is the file name the store is indexed by. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * chore: Trim comments Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * feat: Decompress Zstandard-compressed Android assemblies .NET 11 compresses assemblies with Zstandard (XAZS) instead of LZ4 (XALZ). The 12-byte header is unchanged, so only the magic and the codec differ. Zstandard uses the BCL ZstandardDecoder on net11.0; the net10.0 build throws NotSupportedException, since only .NET 11 apps produce XAZS. Refs #5346 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * test: Don't compile ArchiveUtilsTests for Android Assembly.Location is empty on Android, so the static initializer threw and every test in the class failed on the device runs. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * chore: Trim comments Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * refactor: Address review feedback on Zstandard decompression Magic numbers become internal constants the tests share, and the DecompressZstandard helper is inlined - its assemblyName parameter was unused on .NET 11. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * refactor: Address review feedback on .NET 11 assembly store support Names the magic values in the test fixtures, shares the format number mask with the reader, skips the output buffer allocation when a Zstandard payload can't be decompressed, and logs why reading an assembly failed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * ref: Record that assembly store v4 never shipped in .NET 11 (#5609) dotnet/android#12780 removed the opt-in decompression cache and restored assembly store format version 3 for CoreCLR, so v4 only ever existed in .NET 11 previews. Correct the vendored file headers and ATTRIBUTION, which claimed v4 ships in .NET 11. .NET 11 GA emits v3 with CoreCLR's 32-bit CRC32 name hashes on 64-bit ABIs - a shape the synthetic store tests did not cover. Add it. Co-authored-by: Claude Opus 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com> Co-authored-by: Sentry Github Bot <bot+github-bot@sentry.io>
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.
Stacked on #5577 — this PR's diff is only the comment/attribution corrections and one added test case.
Closes #5604
Summary
#5604 flagged a new commit under the upstream code we vendor into
src/Sentry.Android.AssemblyReader/:8f7c4d4, "[CoreCLR] Remove assembly store decompression cache" (dotnet/android#12780). Reviewing it: it does affect us, and in our favour.Upstream remeasured the opt-in decompression cache and found it made startup worse (+162 ms TTID, +179 ms TTFD), so they removed it — and with it the
content_idheader field it needed, restoring assembly store format version 3 for both CoreCLR and MonoVM. Verified ondotnet/androidmain:AssemblyStoreGenerator.csemitsASSEMBLY_STORE_FORMAT_VERSION_CORECLR_64BIT = 0x80000003StoreReader_V2.Classes.cshas nocontent_id;Header.NativeSizeis a flat5 * sizeof(uint)constStoreReader_V2.csno longer lists the_V4 | ABIversions, and has droppedASSEMBLY_STORE_FORMAT_NUMBER_MASKmainis the .NET 11 branch — there is norelease/11.0.1xx, andeng/Versions.propscarriesAndroidPackVersion 37.2.0with suffixrc.2. The revert (2026-09-15) predates rc.2, while ourglobal.jsonpins11.0.100-rc.1/ workload11.0.100-rc.1.26458.5(2026-09-08), the last build that emitted v4. So v4 never shipped, and .NET 11 GA will emit v3.What this means for the stack
net11.0APK tests are exercising real v3 stores when it happens.AssemblyCompression.csupstream still has theXAZSmagic.index_size / index_entry_count, which is what upstream kept through the revert.Changes
StoreReader.cs/StoreReader.Classes.csandV2/ATTRIBUTION.txtsaid v4 "ships in .NET 11". It doesn't — they now say previews only, and record the revert as a sync point.// Must match the ASSEMBLY_STORE_FORMAT_VERSION native constantnote on the v4 constant is stale; no native constant has that value any more.StoreReaderTestshad a synthetic v4 64-bit store with 32-bit hashes but no v3 equivalent — i.e. no coverage of the shape .NET 11 GA will actually produce. Added.🤖 Generated with Claude Code