Reject field_number 0 tags in _upb_WireReader_SkipValueForceInline.
Protocol Buffer wire format requires field numbers to be positive integers
(1 to 536,870,911). Previously, _upb_WireReader_SkipValueForceInline lacked a
(tag >> 3) == 0 check, allowing upb to accept and round-trip illegal field 0
tags in empty messages, unknown groups, and MessageSet items.
PiperOrigin-RevId: 953447806
Solves "memory leak" when handling a repeated message field. A new message is allocated prior to the size check; if the size check needs to fallback, that message is "leaked" (though still owned by the arena), resulting in an increase in memory usage.
PiperOrigin-RevId: 936365737
The fast path parser had an off-by-one error in its recursion depth limit
check (--d->depth == 0 instead of < 0), causing it to fail on messages
at the maximum supported depth.
PiperOrigin-RevId: 917837775
- `upb_EpsCopyInputStream_Skip()` is equivalent to calling `upb_EpsCopyInputStream_ReadEphemeral()` and ignoring the returned string view.
- `upb_EpsCopyInputStream_Copy()` is equivalent to calling `upb_EpsCopyInputStream_ReadEphemeral()` and then `memcpy()`-ing the contents manually.
PiperOrigin-RevId: 839759685
We use a design where a single function handles both repeated and non-repeated, but calls cardinality helpers that reduce to nothing for the non-repeated case. This lets us share much of the repeated field handling code between different field types, and reduces the number of fast parsing functions we need to write.
For the moment we avoid calling any non-inline function to avoid spilling registers in uncommon paths like "arena is out of memory." We either handle the case entirely inline or we return to fall back to the MiniTable parser.
We can play around with some of these implementation choices once the parser is complete and correct.
PiperOrigin-RevId: 767323516
This represents the style we will use for fast parsing functions going
forward. Code is no longer in macros.
Also added tracing to the decoder so that unit tests can verify that functions are actually getting parsed with the fasttable decoder.
PiperOrigin-RevId: 764939946