Open Bug 1487471 Opened 7 years ago Updated 3 years ago

CoreDump.proto format inhibits backwards compatibility

Categories

(DevTools :: Memory, enhancement, P3)

enhancement

Tracking

(Not tracked)

People

(Reporter: jimb, Unassigned)

Details

The serialization format for heap snapshots defined by devtools/shared/heapsnapshot/CoreDump.proto uses indices to refer to previously serialized strings, which requires readers to visit string-valued fields in exactly the same order as the writer. As a consequence, if a newer writer emits a string-valued field that an older reader doesn't recognize, and the older reader skips the field, the reader's map from indices to strings will become unsynchronized with the writer's. As a consequence, the reader will be unable to map string references to the correct strings, and may encounter string references that it believes are out of range. One possible fix might be to serialize strings separately from other data, and have nodes, edges, etc. use references exclusively. Then, readers need only reliably recognize the serialized strings, rather than needing to process every string-valued field.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.