Skip to content

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

Description

@jamescrosswell

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 #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 #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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    .NETPull requests that update .net codeNext MajorChanges scheduled for the next Major release.Taskupstream-watchUpstream vendored code has changed — review required

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions