DWARF Standard


HOME
SPECIFICATIONS
FAQ
ISSUES



180503.1 Paul Robinson Usage suggestion for LEB128 padding Improvement Open


Section 7.6, pg 222
Values in the LEB128 format are not required to be minimum length; this is a good thing,
as it allows a producer to pad or align data by inserting leading zero or sign-extension
bytes that don't affect the decoded value.  However, consumers should not be expected to
handle arbitrarily long padding strings.  A non-normative comment to this effect would
seem like a reasonable way to guide producers.  I suggest the following.


Some producers may choose to insert padding or alignment bytes by retaining (not discarding)
one or more high-order bytes that would not affect the decoded value.  Note that consumers
are unlikely to tolerate arbitrarily long LEB128 numbers.  A 64-bit value requires at most
ten bytes to encode, so a consumer might reject LEB128 numbers longer than ten bytes.





All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2007-2017 by DWARF Standards Committee.