When we are running the destructor, we do not have an Arena. Since the Arena
is a runtime property, the compiler may not be able to optimize it out.
PiperOrigin-RevId: 531568752
This implements some cross-linking for traversing back up the tree, and some uniformity to aid templatized descriptor helpers. Later changes will make the previously public fields private
PiperOrigin-RevId: 531547696
In both cases a `size_t` was being converted to a `uint32_t`. These headers are used from application code, or at least from generated code, and the application may be compiling with more warnings enabled than normal.
Closes#12762
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/12762 from coryan:fix-avoid-warnings-with-MSVC 5ba6b5db1e
PiperOrigin-RevId: 531506224
This parser reduces binary code size between 1% and 20%, particularly of debug and sanitized builds, while improving aggregate performance.
Micro benchmarks may regress, but large system performance improves.
PiperOrigin-RevId: 531505892
DLLs get in the way of making these tables constexpr in the general case because cross-DLL references are not constant.
However, we need descriptor.proto tables to be constexpr so we keep constexpr there were we know it works. They do not reference other DLLs.
PiperOrigin-RevId: 531256398
When building protobuf with BUILD_SHARED_LIBS disabled, conformance_test_runner should link jsoncpp_static but not jsoncpp_lib.
Closes#12733
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/12733 from semlanik:main 2ab4be6bb0
PiperOrigin-RevId: 530926843
- Make sure the hash flooding test actually does hash flooding. The technique used to choose the inputs stopped working when random seeding was added. Now we assert trees are used in the test so it won't silently break again.
- Improve test coverage for tree buckets.
- Update the hash flood test to use absl::Time/Duration.
- Improve the map tests to use long strings. This way we can test that the values are being properly destroyed. Small strings could be leaked without side effects because of SSO.
PiperOrigin-RevId: 530917835
This crash was due to the fact that we were passing `nullptr` as a `const
char*` parameter and relying on that implicitly converting into an empty
`absl::string_view`. `absl::string_view` supports that functionality, but
starting with C++17 its behavior changes since it's just a type alias for
`std::string_view`. `std::string_view` does not have any special conversion for
nullptr and so we were just getting crashes.
PiperOrigin-RevId: 530431663