Lydon Chandra
ab7e01b804
add SecuritySafeCritical attribute for Net462 to fix failing tests
2 years ago
Lydon Chandra
1e2e6e935a
Updated xml docs as per suggestion
2 years ago
Lydon Chandra
f2e37d44f9
Use StringComparer.Ordinal to sort string keys
2 years ago
Lydon Chandra
590c61d436
PR Review feedback take #1
2 years ago
Lydon Chandra
13087fed1d
removed unused WriteDeterministicTo
2 years ago
Lydon Chandra
1092b7dbd9
add basic deterministic serialization
2 years ago
Protobuf Team Bot
6035df4a22
Add some extra MUSTTAIL annotations.
...
PiperOrigin-RevId: 543832302
2 years ago
Protobuf Team Bot
76a327e1e1
Fix case of locality optimizer being wrong for split repeated fields and add a check that the optimized order has the same size as the unoptimized order.
...
PiperOrigin-RevId: 543779555
2 years ago
Protobuf Team Bot
ee5cf35c1a
Fix issues involving const_cast and repeated fields in reflection.
...
The motivation is to fix correctness issues seen in split repeated fields.
PiperOrigin-RevId: 543779129
2 years ago
Dave MacLachlan
195bdd0488
Fix `-Wsign-compare` issue
...
PiperOrigin-RevId: 543738795
2 years ago
Protobuf Team Bot
3a95ea12cd
Mark DynamicMessage as final
...
This is to lower the number of vtable accesses.
PiperOrigin-RevId: 543634026
2 years ago
Mike Kruskal
ff0dd3a148
Fix objectivec test failure in Bazel 6+.
...
This fix works in Bazel 5 and 6, but the original `import pddm` only works in Bazel 5. This is preventing our upgrade to Bazel 6 that will reduce our mac flakes in CI.
PiperOrigin-RevId: 543565397
2 years ago
Mike Kruskal
ea51496f6e
Allow safety tag removal from GHA.
...
This was broken by a recent lockdown of GHA permissions.
PiperOrigin-RevId: 543531770
2 years ago
Mike Kruskal
7564894af7
Internal changes
...
PiperOrigin-RevId: 543507207
2 years ago
Protobuf Team Bot
80dbc50118
Enable TSan validation to detect when a mutable accessor of a message is called concurrently with another accessor on the same message, which is a data race.
...
This is the second phase, in which we enable validation for enum/primitive fields.
PiperOrigin-RevId: 543475296
2 years ago
Protobuf Team Bot
f10e56cbe1
Auto-generate files after cl/543465667
2 years ago
Protobuf Team Bot
31e5f5d2c8
Add the RawPtr class, which is used to enable easily keeping a raw pointer to an object that is by default all zero bytes.
...
This class enables storing all such default objects in the same default zero buffer.
The motivation for this is usage in split repeated fields.
PiperOrigin-RevId: 543465667
2 years ago
Chris Kennelly
e023e0d23d
Use absl::popcount for obtaining a popcount of set bits.
...
Popcount instructions are widely available on most architectures. Conditioning
the codepath on __POPCNT__ limits the optimization to x86.
PiperOrigin-RevId: 543454555
2 years ago
Protobuf Team Bot
8fe88a5a07
Mark single arg ctor explicit in DynamicMessageFactory.
...
This is in line with best practices since implicit conversion in not necessary nor desired for this class.
PiperOrigin-RevId: 543446110
2 years ago
Protobuf Team Bot
6e9357372b
Follow-up changes to repeated field parsing path.
...
PiperOrigin-RevId: 542972558
2 years ago
Protobuf Team Bot
00d8021801
Auto-generate files after cl/542949247
2 years ago
Adam Cozzette
80df4b29e0
Add `source_file_descriptors` to `CodeGeneratorRequest`
...
PiperOrigin-RevId: 542949247
2 years ago
Protobuf Team Bot
dc934f439f
Miscellaneous fixes for split repeated fields:
...
- Add an empty() accessor to WeakRepeatedPtrField.
- Don't assume ShouldSplit is false for repeated fields.
- For repeated field tracker generated code, call field internal accessors instead of accessing fields by name.
PiperOrigin-RevId: 542936038
2 years ago
Protobuf Team Bot
931412f15d
In Arena::AllocateInternal, avoid instantiating arena_destruct_object<T> in the trivial case and make RepeatedPtrFieldBase arena-compatible.
...
The motivation is that in the case of split repeated fields, we end up calling Arena::CreateMessage<RepeatedPtrFieldBase>, and RepeatedPtrFieldBase has a protected destructor.
PiperOrigin-RevId: 542905924
2 years ago
Justin Lebar
3d61f9091e
Limit how much memory we'll reserve for repeated enum fields.
...
PiperOrigin-RevId: 542899542
2 years ago
Sandy Zhang
e5936049ae
Unify MessageSchema.parseMessage proto2 and proto3 codepaths
...
This handles the following proto2/3 differences in single parseMessage codepath that works for proto2, proto3, and editions
- Groups (proto2)
- Open (proto3) vs closed (proto2) enums, incl closed enums in unknown fields
- Extensions (proto2)
- No presence (proto3)
PiperOrigin-RevId: 542872685
2 years ago
Sandy Zhang
8113bdef84
Delete legacy generate_changelog.py.
...
PiperOrigin-RevId: 542871417
2 years ago
Protobuf Team Bot
9c256398ab
Make protobuf camelCase name conflicts resolve deterministically.
...
PiperOrigin-RevId: 542864033
2 years ago
Mike Kruskal
a1b3ff0ddb
Automated rollback of commit 3e188b7c04
.
...
PiperOrigin-RevId: 542744002
2 years ago
Protobuf Team Bot
a11f6b6d2a
Auto-generate files after cl/542674144
2 years ago
Mike Kruskal
1b162147d3
Add unit-tests for the C++ generator
...
PiperOrigin-RevId: 542674144
2 years ago
Protobuf Team Bot
b483eccef1
Auto-generate files after cl/542651612
2 years ago
Mike Kruskal
8f84e43231
Split out shared infrastructure from code generator unittest.
...
This will allow us to easily expand it to be used for generator unit-tests.
PiperOrigin-RevId: 542651612
2 years ago
Protobuf Team Bot
6d79d13e47
Enable TSan validation to detect when a mutable accessor of a message is called concurrently with another accessor on the same message, which is a data race.
...
This is the first phase, in which we enable validation for repeated/map fields.
PiperOrigin-RevId: 542623187
2 years ago
Protobuf Team Bot
bcf3e36a48
Let ParseRepeatedStringOnce call AllocateFromStringBlock().
...
PiperOrigin-RevId: 542617650
2 years ago
Mike Kruskal
fd5167d40e
Internal changes
...
PiperOrigin-RevId: 542613464
2 years ago
Protobuf Team Bot
7795c895dd
Automated rollback of commit caf1ce3b35
.
...
PiperOrigin-RevId: 542601832
2 years ago
Protobuf Team Bot
29a26156bb
Add SettableValue for generic field setting
...
This is a prerequisite for optional types to have proper setters.
PiperOrigin-RevId: 542588427
2 years ago
Protobuf Team Bot
263248e5b7
Add Optional, FieldEntry stubs for v0.6
...
This should get basic usage unblocked.
PiperOrigin-RevId: 542578731
2 years ago
Marcel Hlopko
f71a9263f9
Refine proxied traits instead of using bounds
...
PiperOrigin-RevId: 542492859
2 years ago
Adam Cozzette
ef17a17f56
Fix msan error in generated_message_reflection_unittest.cc
...
This test was failing in opt mode, because without the debug checks we were
running into undefined behavior. This CL fixes the problem by making sure we
only exercise this error case in non-opt builds.
PiperOrigin-RevId: 542382472
2 years ago
Protobuf Team Bot
ef64c208f2
Remove TcParser::MpRepeatedGroup().
...
PiperOrigin-RevId: 542360663
2 years ago
Protobuf Team Bot
c3a7be8123
Auto-generate files after cl/542354883
2 years ago
Protobuf Team Bot
c76644863a
Change TSan validation to run in phases to reduce risks of roll backs.
...
TSan validation is currently disabled so this should be a no-op.
PiperOrigin-RevId: 542354883
2 years ago
Protobuf Team Bot
a44fc2b063
compiler: Correct depfile generation when there are no outputs
...
Prevents the compiler from generating a malformed depfile if an inpout file did not lead to any meaningful generation. This is an edge case that is not exercised often.
PiperOrigin-RevId: 542354842
2 years ago
Protobuf Team Bot
b0b926a141
Use ProtobufArrayList for repeated bytes field. Presize primitive arrays for fixed-length primitives.
...
PiperOrigin-RevId: 542353392
2 years ago
Mike Kruskal
bcc464686e
Internal changes
...
PiperOrigin-RevId: 542310031
2 years ago
Protobuf Team Bot
9e1cf6fe9c
Check next tag in MpRepeatedMessage.
...
PiperOrigin-RevId: 542301567
2 years ago
Protobuf Team Bot
adb2c4b415
When parsing repeated primitives, append to a tmp array on stack.
...
Adding to a temporary array of values on stack, then merging it to RepeatedField
minimizes dynamic growth of RepeatedField.
PiperOrigin-RevId: 542123764
2 years ago
Protobuf Team Bot
ff847ba8f6
Internal change
...
PiperOrigin-RevId: 542053833
2 years ago