getsentry / getsentry/sentry-dotnet

Port upstream AssemblyStore reader changes: v4/CoreCLR format, _assembly_store symbol, index-entry sizing (next major)

Open
#5,454 4 comments 0 reactions 0 assignees View on GitHub
.NET Next Major Task upstream-watch
Dominant language
C#
Stars
770
Forks
248
Avg merge
2d 22h
Merged PRs (30d)
51

Description

Tracking issue for upstream `dotnet/android` AssemblyStore reader changes that our vendored copy in `src/Sentry.Android.AssemblyReader/` does **not** yet implement. Split out from getsentry/sentry-dotnet#5451 (the watch-upstream alert for the [file move]()). These are targeted at the **next major** release.

Compression (LZ4 → Zstandard) and decompressed-file caching are tracked separately in getsentry/sentry-dotnet#5346 and are **out of scope here**.

## Background

Our vendored parser is already ahead of the `ATTRIBUTION.txt` baseline: it tracks upstream through `64018e13` and hand-ports the **v3** format ([dotnet/android#10249]()). Comparing upstream from there to commit [`f1aecf9`](), the following logic is new upstream and missing from our copy.

## Gaps to port

- [ ] **v4 / CoreCLR store format.** Upstream `StoreReader_V2.cs` now accepts `0x_0000004` versions and reads a new `content_id` field in the header (present when format number >= 4). We accept only v2/v3, so a v4 store is rejected. This is the highest-value item — .NET Android's move to CoreCLR is what produces v4 stores.
- [ ] **Variable index-entry sizing.** Upstream derives entry size from `index_size / index_entry_count` (`GetIndexEntrySize()`) and supports the V2 index-entry layouts, rather than branching on `Is64Bit` with fixed sizes. Ties into v4 and hardens against corrupt or future stores.

Nice-to-have robustness that came with the same commits: `checked` offset arithmetic, `EndOfStreamException` on short reads, and `ArrayPool` buffer reuse in `ReadEntryImageData`.

## Housekeeping

- [ ] Refresh `src/Sentry.Android.AssemblyReader/V2/ATTRIBUTION.txt` — it still cites baseline `5ebcb1dd`, but the code has moved to `64018e13` + local v3.

## Refs

* Watch-upstream alert: getsentry/sentry-dotnet#5451
* Compression/caching (separate): getsentry/sentry-dotnet#5346
* Upstream PRs: [dotnet/android#12104]() (shared v1/v2/v3 + LZ4/Zstd layer), [dotnet/android#12108]() (file-app move)

Contributor guide

Open the contributing guide

Research direction

Start in the vendored reader under src/Sentry.Android.AssemblyReader/ and compare it with upstream StoreReader_V2.cs. Implement support for v4/CoreCLR headers, content_id, and variable index-entry sizing, then refresh src/Sentry.Android.AssemblyReader/V2/ATTRIBUTION.txt. Keep compression and decompressed-file caching out of scope; robustness items are optional.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
devtools
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.