Skip to content

TList / TObjArray ignore their class version (legacy layouts without TObject base, fName, options) #103

Description

@nsmith-

🤖 AI generated content

src/rootfilespec/bootstrap/TList.py reads the TObject base, fName and the count unconditionally (TCollection at :15-19, TList.update_members at :36-56, TObjArray.update_members at :68-77). StreamHeader.fVersion is read and then discarded by _read_all_members (src/rootfilespec/bootstrap/streamedobject.py:232), so no hand-written reader can gate on its class version at all.

Spec: Streamer information §4 "TList" and §5 "TObjArray"; the reviewer checked root/core/cont/src/TList.cxx:1335-1365 and TObjArray.cxx:452-456 in the pinned tree:

TObject base fName option string 255 escape
TList version > 2 version > 1 version > 3 version > 4
TObjArray version > 2 version > 1 never

Containers §1 "TMap" has the same shape (v > 2 / v > 1).

Evidence: by reading the code against the spec and ROOT source; no legacy file exercising these gates was identified in skhep_testdata, so this is unreproduced on real data.

Suggested fix: pass the frame's version word to update_members (e.g. via members or a parameter) so hardcoded classes can gate on it; then add the gates above. The plumbing is the real work and is shared with every other hand-written class that has a version history.

Severity / size: medium (legacy files only) / S once the version is available, M including the plumbing.

Related: #108, #101 (TMap, TClonesArray need the version too), #67 (version plumbing), #105.

Assisted-by: claude-code:claude-fable-5-1

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

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions