|
| 1 | +diff --git a/src/core/util/per_cpu.h b/src/core/util/per_cpu.h |
| 2 | +index 69648aa..5094ccd 100644 |
| 3 | +--- a/src/core/util/per_cpu.h |
| 4 | ++++ b/src/core/util/per_cpu.h |
| 5 | +@@ -82,7 +82,7 @@ class PerCpu { |
| 6 | + public: |
| 7 | + // Options are not defaulted to try and force consideration of what the |
| 8 | + // options specify. |
| 9 | +- explicit PerCpu(PerCpuOptions options) : shards_(options.Shards()) {} |
| 10 | ++ explicit PerCpu(PerCpuOptions options) : shards_(options.Shards()), data_{new T[options.Shards()]} {} |
| 11 | + |
| 12 | + T& this_cpu() { return data_[sharding_helper_.GetShardingBits() % shards_]; } |
| 13 | + |
| 14 | +@@ -94,7 +94,7 @@ class PerCpu { |
| 15 | + private: |
| 16 | + PerCpuShardingHelper sharding_helper_; |
| 17 | + const size_t shards_; |
| 18 | +- std::unique_ptr<T[]> data_{new T[shards_]}; |
| 19 | ++ std::unique_ptr<T[]> data_; |
| 20 | + }; |
| 21 | + |
| 22 | + } // namespace grpc_core |
| 23 | +diff --git a/third_party/upb/upb/message/copy.c b/third_party/upb/upb/message/copy.c |
| 24 | +index 67e1b5b..94f4105 100644 |
| 25 | +--- a/third_party/upb/upb/message/copy.c |
| 26 | ++++ b/third_party/upb/upb/message/copy.c |
| 27 | +@@ -150,7 +150,7 @@ upb_Array* upb_Array_DeepClone(const upb_Array* array, upb_CType value_type, |
| 28 | + for (size_t i = 0; i < size; ++i) { |
| 29 | + upb_MessageValue val = upb_Array_Get(array, i); |
| 30 | + if (!upb_Clone_MessageValue(&val, value_type, sub, arena)) { |
| 31 | +- return false; |
| 32 | ++ return NULL; |
| 33 | + } |
| 34 | + upb_Array_Set(cloned_array, i, val); |
| 35 | + } |
| 36 | +diff --git a/third_party/upb/upb/message/internal/message.c b/third_party/upb/upb/message/internal/message.c |
| 37 | +index 57ab2d7..45b1067 100644 |
| 38 | +--- a/third_party/upb/upb/message/internal/message.c |
| 39 | ++++ b/third_party/upb/upb/message/internal/message.c |
| 40 | +@@ -17,9 +17,35 @@ |
| 41 | + // Must be last. |
| 42 | + #include "upb/port/def.inc" |
| 43 | + |
| 44 | +-const float kUpb_FltInfinity = INFINITY; |
| 45 | +-const double kUpb_Infinity = INFINITY; |
| 46 | +-const double kUpb_NaN = NAN; |
| 47 | ++// The latest win32 SDKs have an invalid definition of NAN. |
| 48 | ++// https://developercommunity.visualstudio.com/t/NAN-is-no-longer-compile-time-constant-i/10688907 |
| 49 | ++// |
| 50 | ++// Unfortunately, the `0.0 / 0.0` workaround doesn't work in Clang under C23, so |
| 51 | ++// try __builtin_nan first, if that exists. |
| 52 | ++#ifdef _WIN32 |
| 53 | ++#ifdef __has_builtin |
| 54 | ++#if __has_builtin(__builtin_nan) |
| 55 | ++#define UPB_NAN __builtin_nan("0") |
| 56 | ++#endif |
| 57 | ++#if __has_builtin(__builtin_inf) |
| 58 | ++#define UPB_INFINITY __builtin_inf() |
| 59 | ++#endif |
| 60 | ++#endif |
| 61 | ++#ifndef UPB_NAN |
| 62 | ++#define UPB_NAN 0.0 / 0.0 |
| 63 | ++#endif |
| 64 | ++#ifndef UPB_INFINITY |
| 65 | ++#define UPB_INFINITY 1.0 / 0.0 |
| 66 | ++#endif |
| 67 | ++#else |
| 68 | ++// For !_WIN32, assume math.h works. |
| 69 | ++#define UPB_NAN NAN |
| 70 | ++#define UPB_INFINITY INFINITY |
| 71 | ++#endif |
| 72 | ++ |
| 73 | ++const float kUpb_FltInfinity = UPB_INFINITY; |
| 74 | ++const double kUpb_Infinity = UPB_INFINITY; |
| 75 | ++const double kUpb_NaN = UPB_NAN; |
| 76 | + |
| 77 | + bool UPB_PRIVATE(_upb_Message_Realloc)(struct upb_Message* msg, size_t need, |
| 78 | + upb_Arena* a) { |
| 79 | +diff --git a/third_party/upb/upb/text/internal/encode.c b/third_party/upb/upb/text/internal/encode.c |
| 80 | +index fc9cc6f..c58c2de 100644 |
| 81 | +--- a/third_party/upb/upb/text/internal/encode.c |
| 82 | ++++ b/third_party/upb/upb/text/internal/encode.c |
| 83 | +@@ -25,7 +25,7 @@ |
| 84 | + #define CHK(x) \ |
| 85 | + do { \ |
| 86 | + if (!(x)) { \ |
| 87 | +- return false; \ |
| 88 | ++ return NULL; \ |
| 89 | + } \ |
| 90 | + } while (0) |
| 91 | + |
| 92 | +diff --git a/third_party/upb/upb/wire/internal/decoder.h b/third_party/upb/upb/wire/internal/decoder.h |
| 93 | +index 5ca1e1b..ea3eb2c 100644 |
| 94 | +--- a/third_party/upb/upb/wire/internal/decoder.h |
| 95 | ++++ b/third_party/upb/upb/wire/internal/decoder.h |
| 96 | +@@ -17,7 +17,7 @@ |
| 97 | + #include "upb/message/internal/message.h" |
| 98 | + #include "upb/wire/decode.h" |
| 99 | + #include "upb/wire/eps_copy_input_stream.h" |
| 100 | +-#include "utf8_range.h" |
| 101 | ++#include "../utf8_range/utf8_range.h" |
| 102 | + |
| 103 | + // Must be last. |
| 104 | + #include "upb/port/def.inc" |
0 commit comments