google-protobuf 4.34.0.rc.2-aarch64-linux-gnu → 4.34.2-aarch64-linux-gnu

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7aa59b05942746e7abd52cf45a3a5278753594f8d25d1af0357eae22d1bfc20a
4
- data.tar.gz: 1dcf58984aeed82aabbad64763682512f5d73a65468b5875d860289d09aa1920
3
+ metadata.gz: 1c37a07235b9f397b708d61ba82b32f01adffecfe173c2c7ba5be4b3bd097b74
4
+ data.tar.gz: b0046f1551a7fe419bbcc7ecdafd95816430c57b9f2c2643dca4ecf6f486d8bd
5
5
  SHA512:
6
- metadata.gz: 152eb49e52b0d259664dff65157dc2e49532d5d513b2988210c60c5f0b3067cf1a02fedae0bd86f4126bbf0399aed7fba115c2561618f2f500db0bb8dd17aeef
7
- data.tar.gz: 3aa0cc96a4f3abca7b07262bd74205166f7ed2f642684f3262a53f4073d85cb2eb3823a94722159a92051d50a8ab4d7da344ead7a67897ea0e550263c3c66be4
6
+ metadata.gz: 1def66ffdf411f9d5247dd59cfd67203ff949c0b067254ff674e9b8f5f49609c31782db3aa53fd947a359c07c000092ab5413e6494a5232058ffc8c720836228
7
+ data.tar.gz: 85cd35e6e9c2ecd8bd61880f4d6f857ee7b21afc2d00946c12089aa682167635dc64afce5866f4aac1e0ad6c24a5b6c6d4d6a19011f1482833ad26a8e8a7e29c
@@ -558,7 +558,15 @@ Error, UINTPTR_MAX is undefined
558
558
  // }
559
559
  // }
560
560
 
561
+ #if defined(__GNUC__) && !defined(__clang__)
562
+ // GCC can't handle mismatched retain attributes in the same section:
563
+ // https://github.com/protocolbuffers/protobuf/issues/26385
564
+ // To work around this, we retain all linker array elements, even though this
565
+ // effectively disables tree-shaking of unused extensions when using GCC.
566
+ #define UPB_LINKARR_ATTR UPB_RETAIN
567
+ #else
561
568
  #define UPB_LINKARR_ATTR
569
+ #endif
562
570
 
563
571
  #define UPB_LINKARR_SENTINEL UPB_RETAIN __attribute__((weak, used))
564
572
 
@@ -10190,7 +10198,12 @@ const upb_MiniTableExtension* upb_ExtensionRegistry_Lookup(
10190
10198
  }
10191
10199
  }
10192
10200
 
10201
+ size_t upb_ExtensionRegistry_Size(const upb_ExtensionRegistry* r) {
10202
+ return upb_strtable_count(&r->exts);
10203
+ }
10204
+
10193
10205
 
10206
+ #include <stddef.h>
10194
10207
  #include <stdint.h>
10195
10208
 
10196
10209
 
@@ -10218,21 +10231,17 @@ static bool _upb_GeneratedRegistry_AddAllLinkedExtensions(
10218
10231
  const UPB_PRIVATE(upb_GeneratedExtensionListEntry)* entry =
10219
10232
  UPB_PRIVATE(upb_generated_extension_list);
10220
10233
  while (entry != NULL) {
10221
- // Comparing pointers to different objects is undefined behavior, so we
10222
- // convert them to uintptr_t and compare their values.
10223
- uintptr_t begin = (uintptr_t)entry->start;
10224
- uintptr_t end = (uintptr_t)entry->stop;
10225
- uintptr_t current = begin;
10226
- while (current < end) {
10227
- const upb_MiniTableExtension* ext =
10228
- (const upb_MiniTableExtension*)current;
10234
+ const upb_MiniTableExtension** current = entry->start;
10235
+ for (current = entry->start; current != entry->stop; ++current) {
10236
+ const upb_MiniTableExtension* ext = *current;
10229
10237
  // Sentinels and padding introduced by the linker can result in zeroed
10230
10238
  // entries, so simply skip them.
10231
- if (upb_MiniTableExtension_Number(ext) == 0) {
10239
+ if (*current == NULL) {
10232
10240
  // MSVC introduces padding that might not be sized exactly the same as
10233
- // upb_MiniTableExtension, so we can't iterate by sizeof. This is a
10234
- // valid thing for any linker to do, so it's safer to just always do it.
10235
- current += UPB_ALIGN_OF(upb_MiniTableExtension);
10241
+ // the linker array element, but it should be properly aligned, so just
10242
+ // skipping empty elements should be safe. (If the size and align of
10243
+ // the array elements was different, we'd have to do something more
10244
+ // complicated).
10236
10245
  continue;
10237
10246
  }
10238
10247
 
@@ -10240,7 +10249,6 @@ static bool _upb_GeneratedRegistry_AddAllLinkedExtensions(
10240
10249
  kUpb_ExtensionRegistryStatus_Ok) {
10241
10250
  return false;
10242
10251
  }
10243
- current += sizeof(upb_MiniTableExtension);
10244
10252
  }
10245
10253
  entry = entry->next;
10246
10254
  }
@@ -16168,9 +16176,13 @@ static void upb_Decoder_AddKnownMessageSetItem(
16168
16176
  upb_Message* submsg = _upb_Decoder_NewSubMessage2(
16169
16177
  d, ext->ext->UPB_PRIVATE(sub).UPB_PRIVATE(submsg),
16170
16178
  &ext->ext->UPB_PRIVATE(field), submsgp);
16179
+ // upb_Decode_LimitDepth() takes uint32_t, d->depth - 1 can not be negative.
16180
+ if (d->depth <= 1) {
16181
+ upb_ErrorHandler_ThrowError(&d->err, kUpb_DecodeStatus_MaxDepthExceeded);
16182
+ }
16171
16183
  upb_DecodeStatus status = upb_Decode(
16172
16184
  data, size, submsg, upb_MiniTableExtension_GetSubMessage(item_mt),
16173
- d->extreg, d->options, &d->arena);
16185
+ d->extreg, upb_Decode_LimitDepth(d->options, d->depth - 1), &d->arena);
16174
16186
  if (status != kUpb_DecodeStatus_Ok) {
16175
16187
  upb_ErrorHandler_ThrowError(&d->err, status);
16176
16188
  }
@@ -557,7 +557,15 @@ Error, UINTPTR_MAX is undefined
557
557
  // }
558
558
  // }
559
559
 
560
+ #if defined(__GNUC__) && !defined(__clang__)
561
+ // GCC can't handle mismatched retain attributes in the same section:
562
+ // https://github.com/protocolbuffers/protobuf/issues/26385
563
+ // To work around this, we retain all linker array elements, even though this
564
+ // effectively disables tree-shaking of unused extensions when using GCC.
565
+ #define UPB_LINKARR_ATTR UPB_RETAIN
566
+ #else
560
567
  #define UPB_LINKARR_ATTR
568
+ #endif
561
569
 
562
570
  #define UPB_LINKARR_SENTINEL UPB_RETAIN __attribute__((weak, used))
563
571
 
@@ -5790,6 +5798,9 @@ upb_ExtensionRegistryStatus upb_ExtensionRegistry_AddArray(
5790
5798
  UPB_API const upb_MiniTableExtension* upb_ExtensionRegistry_Lookup(
5791
5799
  const upb_ExtensionRegistry* r, const upb_MiniTable* t, uint32_t num);
5792
5800
 
5801
+ // Returns the number of extensions in the registry. For testing/debugging only.
5802
+ UPB_API size_t upb_ExtensionRegistry_Size(const upb_ExtensionRegistry* r);
5803
+
5793
5804
  #ifdef __cplusplus
5794
5805
  } /* extern "C" */
5795
5806
  #endif
@@ -5900,8 +5911,8 @@ extern "C" {
5900
5911
  #endif
5901
5912
 
5902
5913
  typedef struct UPB_PRIVATE(upb_GeneratedExtensionListEntry) {
5903
- const struct upb_MiniTableExtension* start;
5904
- const struct upb_MiniTableExtension* stop;
5914
+ const struct upb_MiniTableExtension** start;
5915
+ const struct upb_MiniTableExtension** stop;
5905
5916
  const struct UPB_PRIVATE(upb_GeneratedExtensionListEntry) * next;
5906
5917
  } UPB_PRIVATE(upb_GeneratedExtensionListEntry);
5907
5918
 
Binary file
Binary file
Binary file
Binary file
Binary file
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-protobuf
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.34.0.rc.2
4
+ version: 4.34.2
5
5
  platform: aarch64-linux-gnu
6
6
  authors:
7
7
  - Protobuf Authors
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2026-02-05 00:00:00.000000000 Z
10
+ date: 2026-05-20 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: bigdecimal
@@ -185,7 +185,7 @@ homepage: https://developers.google.com/protocol-buffers
185
185
  licenses:
186
186
  - BSD-3-Clause
187
187
  metadata:
188
- source_code_uri: https://github.com/protocolbuffers/protobuf/tree/v4.34.0-rc2/ruby
188
+ source_code_uri: https://github.com/protocolbuffers/protobuf/tree/v4.34.2/ruby
189
189
  rdoc_options: []
190
190
  require_paths:
191
191
  - lib