do them only once at the beginning instead of for each element.
In the past we hoisted the `rep` checks. This change continues that pattern.
PiperOrigin-RevId: 553901961
A write succeed but only write out a subset of the requested amount
of data, handle that via a helper that will loop and advance as need
to completely write out the data.
PiperOrigin-RevId: 553516360
This flag will be set in UPB which will be submitted separately due to version skew between repos.
This attempts to fix the following error from local and release settings both matching.
```
ERROR: /workspace/_build/out/external/upb/python/dist/BUILD.bazel:251:9: Illegal ambiguous match on configurable attribute "platform" in @upb//python/dist:binary_wheel:
@upb//python/dist:linux_x86_64_local
@upb//python/dist:windows_x86_64
Multiple matches are not allowed unless one is unambiguously more specialized or they resolve to the same value. See https://bazel.build/reference/be/functions#select.
```
PiperOrigin-RevId: 553184373
These are more type safe, and more clearly distinguish between a
raw message and serialized data.
This also defines a macro to create new opaque pointer types, and
switches `RawArena` to using it.
PiperOrigin-RevId: 552957136
This CL sets up the basic plumbing end-to-end for singular message fields.
We add skeletonized support for `Proxied` messages. This is done
by creating structs for $Msg$View and $Msg$Mut, and providing
stubbed impls.
PiperOrigin-RevId: 552609955
Fixes a class of flaky test failures observed only in the FFI implementation due to garbage collection in between calls to an accessors for a frozen field.
Closes#13420
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/13420 from protocolbuffers:rub 0ea91165fb
PiperOrigin-RevId: 552602026
This will make the text format parser reject inputs that have a nesting depth
greater than 150. We will soon lower this number down to 100 for consistency
with other implementations.
For use cases that rely on parsing deeply nested text protos, it is possible to
create a Parser with a custom recursion limit like this:
`TextFormat.Parser.newBuilder().setRecursionLimit(i).build()`.
PiperOrigin-RevId: 552543574
`ConsumeFieldValue()` has some special logic for handling Any fields, but this
does not seem to be necessary since `mergeField` can handle Any fields on its
own. This CL therefore deletes the Any-related logic from
`ConsumeFieldValue()`.
PiperOrigin-RevId: 552540364
- Separate per message options out of PerFieldOptions. We don't need to query
these once per field, and they might be useful even when no fields exist.
- Move FastEv check for !uses_codegen into generated_message_tctable_gen.cc
instead of checking for function names. It is more robust this way.
- Use a variant in FastFieldInfo to make it clear which fields belong to each alternative, and add accessors to easily check for the alternatives.
PiperOrigin-RevId: 551234589
Asan is designed with assumption that by default, stack is unpoisoned.
What ever is poisoned by instrumentation in the stack frame, will be unpoisoned on return.
This assumption applies to user poisoned regions. If it left unpoisoned
it may cause false reports in unrelated stack frames.
PiperOrigin-RevId: 550916830
This is a cleanup that is intended to reduce the noise in current and planned protocol compiler code, and improve readability of the code.
PiperOrigin-RevId: 550631662
Currently this corner case (discovered by fuzzing) is not considered. The code throws `ArrayIndexOutOfBoundsException` which can escape `protobuf.toString()` method.
PiperOrigin-RevId: 550514062