Skip to content

Commit 7b0ca69

Browse files
authored
Updated release branch to latest upb. (#11258)
* Updated release branch to latest upb. * Updated amalgamated files.
1 parent 7c123c4 commit 7b0ca69

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

php/ext/google/protobuf/php-upb.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6143,15 +6143,14 @@ upb_EnumReservedRange* _upb_EnumReservedRanges_New(
61436143
google_protobuf_EnumDescriptorProto_EnumReservedRange_start(protos[i]);
61446144
const int32_t end =
61456145
google_protobuf_EnumDescriptorProto_EnumReservedRange_end(protos[i]);
6146-
const int32_t max = kUpb_MaxFieldNumber + 1;
61476146

61486147
// A full validation would also check that each range is disjoint, and that
61496148
// none of the fields overlap with the extension ranges, but we are just
61506149
// sanity checking here.
61516150

61526151
// Note: Not a typo! Unlike extension ranges and message reserved ranges,
61536152
// the end value of an enum reserved range is *inclusive*!
6154-
if (start < 1 || end < start || end > max) {
6153+
if (end < start) {
61556154
symtab_errf(ctx, "Reserved range (%d, %d) is invalid, enum=%s\n",
61566155
(int)start, (int)end, upb_EnumDef_FullName(e));
61576156
}
@@ -8184,7 +8183,7 @@ static void create_fielddef(
81848183
CHK_OOM(
81858184
upb_strtable_insert(&oneof->ntof, name.data, name.size, v, ctx->arena));
81868185
} else {
8187-
if (f->proto3_optional_) {
8186+
if (f->proto3_optional_ && !is_extension) {
81888187
symtab_errf(ctx, "field with proto3_optional was not in a oneof (%s)",
81898188
f->full_name);
81908189
}

protobuf_deps.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,6 @@ def protobuf_deps():
117117
_github_archive(
118118
name = "upb",
119119
repo = "https://github.com/protocolbuffers/upb",
120-
commit = "969f6fdb88e94ced87953e53716893c68ec7b1ce",
121-
sha256 = "6754b7f95c92f69a832a82931aea40d066cc689dbc1eb3348b84c1ed95285296",
120+
commit = "20b542a767139732548f7b8cf28c4c928cdcb07b",
121+
sha256 = "c77158955326f9e9a0cf8481c118b8ad5c34df99e5db3af27f3d1662d8bedef7",
122122
)

ruby/ext/google/protobuf_c/ruby-upb.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5814,15 +5814,14 @@ upb_EnumReservedRange* _upb_EnumReservedRanges_New(
58145814
google_protobuf_EnumDescriptorProto_EnumReservedRange_start(protos[i]);
58155815
const int32_t end =
58165816
google_protobuf_EnumDescriptorProto_EnumReservedRange_end(protos[i]);
5817-
const int32_t max = kUpb_MaxFieldNumber + 1;
58185817

58195818
// A full validation would also check that each range is disjoint, and that
58205819
// none of the fields overlap with the extension ranges, but we are just
58215820
// sanity checking here.
58225821

58235822
// Note: Not a typo! Unlike extension ranges and message reserved ranges,
58245823
// the end value of an enum reserved range is *inclusive*!
5825-
if (start < 1 || end < start || end > max) {
5824+
if (end < start) {
58265825
symtab_errf(ctx, "Reserved range (%d, %d) is invalid, enum=%s\n",
58275826
(int)start, (int)end, upb_EnumDef_FullName(e));
58285827
}
@@ -7855,7 +7854,7 @@ static void create_fielddef(
78557854
CHK_OOM(
78567855
upb_strtable_insert(&oneof->ntof, name.data, name.size, v, ctx->arena));
78577856
} else {
7858-
if (f->proto3_optional_) {
7857+
if (f->proto3_optional_ && !is_extension) {
78597858
symtab_errf(ctx, "field with proto3_optional was not in a oneof (%s)",
78607859
f->full_name);
78617860
}

0 commit comments

Comments
 (0)