[roll] Roll fuchsia [packet][records] Overhaul options LengthEncoding
Previously, `OptionsImplLayout` had two const parameters,
`LENGTH_ENCODING` and `OPTION_LEN_MULTIPLIER`, which had interlocking
correctness properties - certain pairs of values for these parameters
were invalid, and validity was enforced via a hack which would fail at
link time if illegal pairs of values were used.
The `LENGTH_ENCODING` parameter had the following type:
pub enum LengthEncoding {
TypeLengthValue,
ValueOnly,
}
This commit removes the `OPTION_LEN_MULTIPLIER` parameter, and redefines
`LengthEncoding` like so:
pub enum LengthEncoding {
TypeLengthValue { option_len_multiplier: NonZeroUsize },
ValueOnly,
}
This new definition makes it impossible to represent the illegal pair of
values that was a possibility before.
This commit also fixes a bug in options parsing in which, if
`LENGTH_ENCODING` were set to `ValueOnly`, the parser would still treat
the length field as encoding the length of the kind and length bytes
along with the body bytes.
Original-Fixed: 73253
Test: fx test packet-test test_length_encoding
Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/507000
Original-Revision: 4bfb1a2c3041e55b156ec5aac3161b7520b73dd5
GitOrigin-RevId: 9cf72fa272bfd478b41f7020cbb33342e71aed91
Change-Id: I602daf7662f33bdd30e6002d944838f545f7fdce
This repository contains Fuchsia's Global Integration manifest files.
All changes should be made to the internal version of this repository. Our infrastructure automatically updates this version when the internal one changes.
Currently all changes must be made by a Google employee. Non-Google employees wishing to make a change can ask for assistance via the IRC channel #fuchsia on Freenode.
First install Jiri.
Next run:
$ jiri init $ jiri import minimal https://fuchsia.googlesource.com/integration $ jiri update
Third party projects should have their own subdirectory in ./third_party.