Fix java_linkage_monitor test.

This was silently breaking because we didn't fail on errors in the test script.  The upb version is also bumped to pull in improvements for system_python that fix the underlying issue (python 3.5 doesn't work with our pip dependencies).

PiperOrigin-RevId: 492526855
pull/11133/head
Mike Kruskal 2 years ago committed by Copybara-Service
parent c04f842613
commit aba04743d2
  1. 2
      kokoro/linux/java_linkage_monitor/build.sh
  2. 9
      php/ext/google/protobuf/php-upb.c
  3. 6
      php/ext/google/protobuf/php-upb.h
  4. 4
      protobuf_deps.bzl
  5. 9
      ruby/ext/google/protobuf_c/ruby-upb.c
  6. 6
      ruby/ext/google/protobuf_c/ruby-upb.h

@ -6,6 +6,8 @@
# This script selects a specific Dockerfile (for building a Docker image) and # This script selects a specific Dockerfile (for building a Docker image) and
# a script to run inside that image. # a script to run inside that image.
set -eux
use_bazel.sh 4.2.2 use_bazel.sh 4.2.2
# Change to repo root # Change to repo root

@ -6377,9 +6377,12 @@ static void upb_MtDecoder_ParseMap(upb_MtDecoder* d, const char* data,
upb_MtDecoder_AssignHasbits(d->table); upb_MtDecoder_AssignHasbits(d->table);
// Map entries have a pre-determined layout, regardless of types. // Map entries have a pre-determined layout, regardless of types.
d->fields[0].offset = offsetof(upb_MapEntryData, k); // NOTE: sync with mini_table/message_internal.h.
d->fields[1].offset = offsetof(upb_MapEntryData, v); const size_t kv_size = d->platform == kUpb_MiniTablePlatform_32Bit ? 8 : 16;
d->table->size = UPB_ALIGN_UP(sizeof(upb_MapEntryData), 8); const size_t hasbit_size = 8;
d->fields[0].offset = hasbit_size;
d->fields[1].offset = hasbit_size + kv_size;
d->table->size = UPB_ALIGN_UP(hasbit_size + kv_size + kv_size, 8);
// Map entries have a special bit set to signal it's a map entry, used in // Map entries have a special bit set to signal it's a map entry, used in
// upb_MiniTable_SetSubMessage() below. // upb_MiniTable_SetSubMessage() below.

@ -1497,8 +1497,12 @@ struct upb_MiniTable {
// //
// Note that users can and do create map entries directly, which will also use // Note that users can and do create map entries directly, which will also use
// this layout. // this layout.
//
// NOTE: sync with mini_table/decode.c.
typedef struct { typedef struct {
uint32_t hasbits; // We only need 2 hasbits max, but due to alignment we'll use 8 bytes here,
// and the uint64_t helps make this clear.
uint64_t hasbits;
union { union {
upb_StringView str; // For str/bytes. upb_StringView str; // For str/bytes.
upb_value val; // For all other types. upb_value val; // For all other types.

@ -135,6 +135,6 @@ def protobuf_deps():
_github_archive( _github_archive(
name = "upb", name = "upb",
repo = "https://github.com/protocolbuffers/upb", repo = "https://github.com/protocolbuffers/upb",
commit = "b198dd0754c415fa2bc445b2f07121ac3761048b", commit = "ee56471047ad8619d0c701f894aa1767ca91f5c2",
sha256 = "f400a6b425cfb334c360fc50192343139941aebeb451ed1d793b7cdba75a066c", sha256 = "0c3f86ce497e6cc75e89a0d4a8e32c90ea25aaedabd6d42fb9e2f2ad52d3f4b0",
) )

@ -6043,9 +6043,12 @@ static void upb_MtDecoder_ParseMap(upb_MtDecoder* d, const char* data,
upb_MtDecoder_AssignHasbits(d->table); upb_MtDecoder_AssignHasbits(d->table);
// Map entries have a pre-determined layout, regardless of types. // Map entries have a pre-determined layout, regardless of types.
d->fields[0].offset = offsetof(upb_MapEntryData, k); // NOTE: sync with mini_table/message_internal.h.
d->fields[1].offset = offsetof(upb_MapEntryData, v); const size_t kv_size = d->platform == kUpb_MiniTablePlatform_32Bit ? 8 : 16;
d->table->size = UPB_ALIGN_UP(sizeof(upb_MapEntryData), 8); const size_t hasbit_size = 8;
d->fields[0].offset = hasbit_size;
d->fields[1].offset = hasbit_size + kv_size;
d->table->size = UPB_ALIGN_UP(hasbit_size + kv_size + kv_size, 8);
// Map entries have a special bit set to signal it's a map entry, used in // Map entries have a special bit set to signal it's a map entry, used in
// upb_MiniTable_SetSubMessage() below. // upb_MiniTable_SetSubMessage() below.

@ -1499,8 +1499,12 @@ struct upb_MiniTable {
// //
// Note that users can and do create map entries directly, which will also use // Note that users can and do create map entries directly, which will also use
// this layout. // this layout.
//
// NOTE: sync with mini_table/decode.c.
typedef struct { typedef struct {
uint32_t hasbits; // We only need 2 hasbits max, but due to alignment we'll use 8 bytes here,
// and the uint64_t helps make this clear.
uint64_t hasbits;
union { union {
upb_StringView str; // For str/bytes. upb_StringView str; // For str/bytes.
upb_value val; // For all other types. upb_value val; // For all other types.

Loading…
Cancel
Save