diff --git a/csharp/src/Google.Protobuf.Test/testprotos.pb b/csharp/src/Google.Protobuf.Test/testprotos.pb index 8d87ec8b133d..0381387d4002 100644 Binary files a/csharp/src/Google.Protobuf.Test/testprotos.pb and b/csharp/src/Google.Protobuf.Test/testprotos.pb differ diff --git a/csharp/src/Google.Protobuf/Compiler/Plugin.pb.cs b/csharp/src/Google.Protobuf/Compiler/Plugin.pb.cs index ae96061243bf..413b6f8dfd5e 100644 --- a/csharp/src/Google.Protobuf/Compiler/Plugin.pb.cs +++ b/csharp/src/Google.Protobuf/Compiler/Plugin.pb.cs @@ -33,17 +33,18 @@ static PluginReflection() { "LnByb3RvYnVmLkZpbGVEZXNjcmlwdG9yUHJvdG8SRQoXc291cmNlX2ZpbGVf", "ZGVzY3JpcHRvcnMYESADKAsyJC5nb29nbGUucHJvdG9idWYuRmlsZURlc2Ny", "aXB0b3JQcm90bxI7ChBjb21waWxlcl92ZXJzaW9uGAMgASgLMiEuZ29vZ2xl", - "LnByb3RvYnVmLmNvbXBpbGVyLlZlcnNpb24iwQIKFUNvZGVHZW5lcmF0b3JS", + "LnByb3RvYnVmLmNvbXBpbGVyLlZlcnNpb24i4AIKFUNvZGVHZW5lcmF0b3JS", "ZXNwb25zZRINCgVlcnJvchgBIAEoCRIaChJzdXBwb3J0ZWRfZmVhdHVyZXMY", "AiABKAQSQgoEZmlsZRgPIAMoCzI0Lmdvb2dsZS5wcm90b2J1Zi5jb21waWxl", "ci5Db2RlR2VuZXJhdG9yUmVzcG9uc2UuRmlsZRp/CgRGaWxlEgwKBG5hbWUY", "ASABKAkSFwoPaW5zZXJ0aW9uX3BvaW50GAIgASgJEg8KB2NvbnRlbnQYDyAB", "KAkSPwoTZ2VuZXJhdGVkX2NvZGVfaW5mbxgQIAEoCzIiLmdvb2dsZS5wcm90", - "b2J1Zi5HZW5lcmF0ZWRDb2RlSW5mbyI4CgdGZWF0dXJlEhAKDEZFQVRVUkVf", - "Tk9ORRAAEhsKF0ZFQVRVUkVfUFJPVE8zX09QVElPTkFMEAFCcgocY29tLmdv", - "b2dsZS5wcm90b2J1Zi5jb21waWxlckIMUGx1Z2luUHJvdG9zWilnb29nbGUu", - "Z29sYW5nLm9yZy9wcm90b2J1Zi90eXBlcy9wbHVnaW5wYqoCGEdvb2dsZS5Q", - "cm90b2J1Zi5Db21waWxlcg==")); + "b2J1Zi5HZW5lcmF0ZWRDb2RlSW5mbyJXCgdGZWF0dXJlEhAKDEZFQVRVUkVf", + "Tk9ORRAAEhsKF0ZFQVRVUkVfUFJPVE8zX09QVElPTkFMEAESHQoZRkVBVFVS", + "RV9TVVBQT1JUU19FRElUSU9OUxACQnIKHGNvbS5nb29nbGUucHJvdG9idWYu", + "Y29tcGlsZXJCDFBsdWdpblByb3Rvc1opZ29vZ2xlLmdvbGFuZy5vcmcvcHJv", + "dG9idWYvdHlwZXMvcGx1Z2lucGKqAhhHb29nbGUuUHJvdG9idWYuQ29tcGls", + "ZXI=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Google.Protobuf.Reflection.DescriptorReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { @@ -1100,6 +1101,7 @@ public static partial class Types { public enum Feature { [pbr::OriginalName("FEATURE_NONE")] None = 0, [pbr::OriginalName("FEATURE_PROTO3_OPTIONAL")] Proto3Optional = 1, + [pbr::OriginalName("FEATURE_SUPPORTS_EDITIONS")] SupportsEditions = 2, } /// diff --git a/csharp/src/Google.Protobuf/Reflection/Descriptor.pb.cs b/csharp/src/Google.Protobuf/Reflection/Descriptor.pb.cs index e6feb90745e3..36d123449c6c 100644 --- a/csharp/src/Google.Protobuf/Reflection/Descriptor.pb.cs +++ b/csharp/src/Google.Protobuf/Reflection/Descriptor.pb.cs @@ -182,7 +182,7 @@ static DescriptorReflection() { "dGl2ZV9pbnRfdmFsdWUYBSABKAMSFAoMZG91YmxlX3ZhbHVlGAYgASgBEhQK", "DHN0cmluZ192YWx1ZRgHIAEoDBIXCg9hZ2dyZWdhdGVfdmFsdWUYCCABKAka", "MwoITmFtZVBhcnQSEQoJbmFtZV9wYXJ0GAEgAigJEhQKDGlzX2V4dGVuc2lv", - "bhgCIAIoCCLxCAoKRmVhdHVyZVNldBJfCg5maWVsZF9wcmVzZW5jZRgBIAEo", + "bhgCIAIoCCKqCQoKRmVhdHVyZVNldBJfCg5maWVsZF9wcmVzZW5jZRgBIAEo", "DjIpLmdvb2dsZS5wcm90b2J1Zi5GZWF0dXJlU2V0LkZpZWxkUHJlc2VuY2VC", "HIgBAZgBBJgBAaIBEAoEMjAyMxIIRVhQTElDSVQSUQoJZW51bV90eXBlGAIg", "ASgOMiQuZ29vZ2xlLnByb3RvYnVmLkZlYXR1cmVTZXQuRW51bVR5cGVCGIgB", @@ -195,33 +195,34 @@ static DescriptorReflection() { "BSABKA4yKy5nb29nbGUucHJvdG9idWYuRmVhdHVyZVNldC5NZXNzYWdlRW5j", "b2RpbmdCI4gBAZgBBJgBAaIBFwoEMjAyMxIPTEVOR1RIX1BSRUZJWEVEElkK", "C2pzb25fZm9ybWF0GAYgASgOMiYuZ29vZ2xlLnByb3RvYnVmLkZlYXR1cmVT", - "ZXQuSnNvbkZvcm1hdEIciAEBmAEDmAEGmAEBogENCgQyMDIzEgVBTExPVyJc", - "Cg1GaWVsZFByZXNlbmNlEhoKFkZJRUxEX1BSRVNFTkNFX1VOS05PV04QABIM", - "CghFWFBMSUNJVBABEgwKCElNUExJQ0lUEAISEwoPTEVHQUNZX1JFUVVJUkVE", - "EAMiNwoIRW51bVR5cGUSFQoRRU5VTV9UWVBFX1VOS05PV04QABIICgRPUEVO", - "EAESCgoGQ0xPU0VEEAIiVgoVUmVwZWF0ZWRGaWVsZEVuY29kaW5nEiMKH1JF", - "UEVBVEVEX0ZJRUxEX0VOQ09ESU5HX1VOS05PV04QABIKCgZQQUNLRUQQARIM", - "CghFWFBBTkRFRBACIl8KFVN0cmluZ0ZpZWxkVmFsaWRhdGlvbhIjCh9TVFJJ", - "TkdfRklFTERfVkFMSURBVElPTl9VTktOT1dOEAASDQoJTUFOREFUT1JZEAES", - "CAoESElOVBACEggKBE5PTkUQAyJTCg9NZXNzYWdlRW5jb2RpbmcSHAoYTUVT", - "U0FHRV9FTkNPRElOR19VTktOT1dOEAASEwoPTEVOR1RIX1BSRUZJWEVEEAES", - "DQoJREVMSU1JVEVEEAIiSAoKSnNvbkZvcm1hdBIXChNKU09OX0ZPUk1BVF9V", - "TktOT1dOEAASCQoFQUxMT1cQARIWChJMRUdBQ1lfQkVTVF9FRkZPUlQQAioG", - "COgHEOkHKgYI6QcQ6gcqBgiLThCQTiLVAQoOU291cmNlQ29kZUluZm8SOgoI", - "bG9jYXRpb24YASADKAsyKC5nb29nbGUucHJvdG9idWYuU291cmNlQ29kZUlu", - "Zm8uTG9jYXRpb24ahgEKCExvY2F0aW9uEhAKBHBhdGgYASADKAVCAhABEhAK", - "BHNwYW4YAiADKAVCAhABEhgKEGxlYWRpbmdfY29tbWVudHMYAyABKAkSGQoR", - "dHJhaWxpbmdfY29tbWVudHMYBCABKAkSIQoZbGVhZGluZ19kZXRhY2hlZF9j", - "b21tZW50cxgGIAMoCSKcAgoRR2VuZXJhdGVkQ29kZUluZm8SQQoKYW5ub3Rh", - "dGlvbhgBIAMoCzItLmdvb2dsZS5wcm90b2J1Zi5HZW5lcmF0ZWRDb2RlSW5m", - "by5Bbm5vdGF0aW9uGsMBCgpBbm5vdGF0aW9uEhAKBHBhdGgYASADKAVCAhAB", - "EhMKC3NvdXJjZV9maWxlGAIgASgJEg0KBWJlZ2luGAMgASgFEgsKA2VuZBgE", - "IAEoBRJICghzZW1hbnRpYxgFIAEoDjI2Lmdvb2dsZS5wcm90b2J1Zi5HZW5l", - "cmF0ZWRDb2RlSW5mby5Bbm5vdGF0aW9uLlNlbWFudGljIigKCFNlbWFudGlj", - "EggKBE5PTkUQABIHCgNTRVQQARIJCgVBTElBUxACQn4KE2NvbS5nb29nbGUu", - "cHJvdG9idWZCEERlc2NyaXB0b3JQcm90b3NIAVotZ29vZ2xlLmdvbGFuZy5v", - "cmcvcHJvdG9idWYvdHlwZXMvZGVzY3JpcHRvcnBi+AEBogIDR1BCqgIaR29v", - "Z2xlLlByb3RvYnVmLlJlZmxlY3Rpb24=")); + "ZXQuSnNvbkZvcm1hdEIciAEBmAEDmAEGmAEBogENCgQyMDIzEgVBTExPVxI3", + "CgxyYXdfZmVhdHVyZXMY5wcgASgLMhsuZ29vZ2xlLnByb3RvYnVmLkZlYXR1", + "cmVTZXRCA5gBACJcCg1GaWVsZFByZXNlbmNlEhoKFkZJRUxEX1BSRVNFTkNF", + "X1VOS05PV04QABIMCghFWFBMSUNJVBABEgwKCElNUExJQ0lUEAISEwoPTEVH", + "QUNZX1JFUVVJUkVEEAMiNwoIRW51bVR5cGUSFQoRRU5VTV9UWVBFX1VOS05P", + "V04QABIICgRPUEVOEAESCgoGQ0xPU0VEEAIiVgoVUmVwZWF0ZWRGaWVsZEVu", + "Y29kaW5nEiMKH1JFUEVBVEVEX0ZJRUxEX0VOQ09ESU5HX1VOS05PV04QABIK", + "CgZQQUNLRUQQARIMCghFWFBBTkRFRBACIl8KFVN0cmluZ0ZpZWxkVmFsaWRh", + "dGlvbhIjCh9TVFJJTkdfRklFTERfVkFMSURBVElPTl9VTktOT1dOEAASDQoJ", + "TUFOREFUT1JZEAESCAoESElOVBACEggKBE5PTkUQAyJTCg9NZXNzYWdlRW5j", + "b2RpbmcSHAoYTUVTU0FHRV9FTkNPRElOR19VTktOT1dOEAASEwoPTEVOR1RI", + "X1BSRUZJWEVEEAESDQoJREVMSU1JVEVEEAIiSAoKSnNvbkZvcm1hdBIXChNK", + "U09OX0ZPUk1BVF9VTktOT1dOEAASCQoFQUxMT1cQARIWChJMRUdBQ1lfQkVT", + "VF9FRkZPUlQQAioGCOgHEOkHKgYI6QcQ6gcqBgiLThCQTiLVAQoOU291cmNl", + "Q29kZUluZm8SOgoIbG9jYXRpb24YASADKAsyKC5nb29nbGUucHJvdG9idWYu", + "U291cmNlQ29kZUluZm8uTG9jYXRpb24ahgEKCExvY2F0aW9uEhAKBHBhdGgY", + "ASADKAVCAhABEhAKBHNwYW4YAiADKAVCAhABEhgKEGxlYWRpbmdfY29tbWVu", + "dHMYAyABKAkSGQoRdHJhaWxpbmdfY29tbWVudHMYBCABKAkSIQoZbGVhZGlu", + "Z19kZXRhY2hlZF9jb21tZW50cxgGIAMoCSKcAgoRR2VuZXJhdGVkQ29kZUlu", + "Zm8SQQoKYW5ub3RhdGlvbhgBIAMoCzItLmdvb2dsZS5wcm90b2J1Zi5HZW5l", + "cmF0ZWRDb2RlSW5mby5Bbm5vdGF0aW9uGsMBCgpBbm5vdGF0aW9uEhAKBHBh", + "dGgYASADKAVCAhABEhMKC3NvdXJjZV9maWxlGAIgASgJEg0KBWJlZ2luGAMg", + "ASgFEgsKA2VuZBgEIAEoBRJICghzZW1hbnRpYxgFIAEoDjI2Lmdvb2dsZS5w", + "cm90b2J1Zi5HZW5lcmF0ZWRDb2RlSW5mby5Bbm5vdGF0aW9uLlNlbWFudGlj", + "IigKCFNlbWFudGljEggKBE5PTkUQABIHCgNTRVQQARIJCgVBTElBUxACQn4K", + "E2NvbS5nb29nbGUucHJvdG9idWZCEERlc2NyaXB0b3JQcm90b3NIAVotZ29v", + "Z2xlLmdvbGFuZy5vcmcvcHJvdG9idWYvdHlwZXMvZGVzY3JpcHRvcnBi+AEB", + "ogIDR1BCqgIaR29vZ2xlLlByb3RvYnVmLlJlZmxlY3Rpb24=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { @@ -245,7 +246,7 @@ static DescriptorReflection() { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.ServiceOptions), global::Google.Protobuf.Reflection.ServiceOptions.Parser, new[]{ "Features", "Deprecated", "UninterpretedOption" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.MethodOptions), global::Google.Protobuf.Reflection.MethodOptions.Parser, new[]{ "Deprecated", "IdempotencyLevel", "Features", "UninterpretedOption" }, null, new[]{ typeof(global::Google.Protobuf.Reflection.MethodOptions.Types.IdempotencyLevel) }, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.UninterpretedOption), global::Google.Protobuf.Reflection.UninterpretedOption.Parser, new[]{ "Name", "IdentifierValue", "PositiveIntValue", "NegativeIntValue", "DoubleValue", "StringValue", "AggregateValue" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.UninterpretedOption.Types.NamePart), global::Google.Protobuf.Reflection.UninterpretedOption.Types.NamePart.Parser, new[]{ "NamePart_", "IsExtension" }, null, null, null, null)}), - new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.FeatureSet), global::Google.Protobuf.Reflection.FeatureSet.Parser, new[]{ "FieldPresence", "EnumType", "RepeatedFieldEncoding", "StringFieldValidation", "MessageEncoding", "JsonFormat" }, null, new[]{ typeof(global::Google.Protobuf.Reflection.FeatureSet.Types.FieldPresence), typeof(global::Google.Protobuf.Reflection.FeatureSet.Types.EnumType), typeof(global::Google.Protobuf.Reflection.FeatureSet.Types.RepeatedFieldEncoding), typeof(global::Google.Protobuf.Reflection.FeatureSet.Types.StringFieldValidation), typeof(global::Google.Protobuf.Reflection.FeatureSet.Types.MessageEncoding), typeof(global::Google.Protobuf.Reflection.FeatureSet.Types.JsonFormat) }, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.FeatureSet), global::Google.Protobuf.Reflection.FeatureSet.Parser, new[]{ "FieldPresence", "EnumType", "RepeatedFieldEncoding", "StringFieldValidation", "MessageEncoding", "JsonFormat", "RawFeatures" }, null, new[]{ typeof(global::Google.Protobuf.Reflection.FeatureSet.Types.FieldPresence), typeof(global::Google.Protobuf.Reflection.FeatureSet.Types.EnumType), typeof(global::Google.Protobuf.Reflection.FeatureSet.Types.RepeatedFieldEncoding), typeof(global::Google.Protobuf.Reflection.FeatureSet.Types.StringFieldValidation), typeof(global::Google.Protobuf.Reflection.FeatureSet.Types.MessageEncoding), typeof(global::Google.Protobuf.Reflection.FeatureSet.Types.JsonFormat) }, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.SourceCodeInfo), global::Google.Protobuf.Reflection.SourceCodeInfo.Parser, new[]{ "Location" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.SourceCodeInfo.Types.Location), global::Google.Protobuf.Reflection.SourceCodeInfo.Types.Location.Parser, new[]{ "Path", "Span", "LeadingComments", "TrailingComments", "LeadingDetachedComments" }, null, null, null, null)}), new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.GeneratedCodeInfo), global::Google.Protobuf.Reflection.GeneratedCodeInfo.Parser, new[]{ "Annotation" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Reflection.GeneratedCodeInfo.Types.Annotation), global::Google.Protobuf.Reflection.GeneratedCodeInfo.Types.Annotation.Parser, new[]{ "Path", "SourceFile", "Begin", "End", "Semantic" }, null, new[]{ typeof(global::Google.Protobuf.Reflection.GeneratedCodeInfo.Types.Annotation.Types.Semantic) }, null, null)}) })); @@ -11673,6 +11674,7 @@ public FeatureSet(FeatureSet other) : this() { stringFieldValidation_ = other.stringFieldValidation_; messageEncoding_ = other.messageEncoding_; jsonFormat_ = other.jsonFormat_; + rawFeatures_ = other.rawFeatures_ != null ? other.rawFeatures_.Clone() : null; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); _extensions = pb::ExtensionSet.Clone(other._extensions); } @@ -11845,6 +11847,18 @@ public void ClearJsonFormat() { _hasBits0 &= ~32; } + /// Field number for the "raw_features" field. + public const int RawFeaturesFieldNumber = 999; + private global::Google.Protobuf.Reflection.FeatureSet rawFeatures_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.Reflection.FeatureSet RawFeatures { + get { return rawFeatures_; } + set { + rawFeatures_ = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { @@ -11866,6 +11880,7 @@ public bool Equals(FeatureSet other) { if (StringFieldValidation != other.StringFieldValidation) return false; if (MessageEncoding != other.MessageEncoding) return false; if (JsonFormat != other.JsonFormat) return false; + if (!object.Equals(RawFeatures, other.RawFeatures)) return false; if (!Equals(_extensions, other._extensions)) { return false; } @@ -11882,6 +11897,7 @@ public override int GetHashCode() { if (HasStringFieldValidation) hash ^= StringFieldValidation.GetHashCode(); if (HasMessageEncoding) hash ^= MessageEncoding.GetHashCode(); if (HasJsonFormat) hash ^= JsonFormat.GetHashCode(); + if (rawFeatures_ != null) hash ^= RawFeatures.GetHashCode(); if (_extensions != null) { hash ^= _extensions.GetHashCode(); } @@ -11927,6 +11943,10 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteRawTag(48); output.WriteEnum((int) JsonFormat); } + if (rawFeatures_ != null) { + output.WriteRawTag(186, 62); + output.WriteMessage(RawFeatures); + } if (_extensions != null) { _extensions.WriteTo(output); } @@ -11964,6 +11984,10 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteRawTag(48); output.WriteEnum((int) JsonFormat); } + if (rawFeatures_ != null) { + output.WriteRawTag(186, 62); + output.WriteMessage(RawFeatures); + } if (_extensions != null) { _extensions.WriteTo(ref output); } @@ -11995,6 +12019,9 @@ public int CalculateSize() { if (HasJsonFormat) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) JsonFormat); } + if (rawFeatures_ != null) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(RawFeatures); + } if (_extensions != null) { size += _extensions.CalculateSize(); } @@ -12028,6 +12055,12 @@ public void MergeFrom(FeatureSet other) { if (other.HasJsonFormat) { JsonFormat = other.JsonFormat; } + if (other.rawFeatures_ != null) { + if (rawFeatures_ == null) { + RawFeatures = new global::Google.Protobuf.Reflection.FeatureSet(); + } + RawFeatures.MergeFrom(other.RawFeatures); + } pb::ExtensionSet.MergeFrom(ref _extensions, other._extensions); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -12070,6 +12103,13 @@ public void MergeFrom(pb::CodedInputStream input) { JsonFormat = (global::Google.Protobuf.Reflection.FeatureSet.Types.JsonFormat) input.ReadEnum(); break; } + case 7994: { + if (rawFeatures_ == null) { + RawFeatures = new global::Google.Protobuf.Reflection.FeatureSet(); + } + input.ReadMessage(RawFeatures); + break; + } } } #endif @@ -12111,6 +12151,13 @@ public void MergeFrom(pb::CodedInputStream input) { JsonFormat = (global::Google.Protobuf.Reflection.FeatureSet.Types.JsonFormat) input.ReadEnum(); break; } + case 7994: { + if (rawFeatures_ == null) { + RawFeatures = new global::Google.Protobuf.Reflection.FeatureSet(); + } + input.ReadMessage(RawFeatures); + break; + } } } } diff --git a/protobuf_deps.bzl b/protobuf_deps.bzl index 89cdf97dfe76..a1ea31c83581 100644 --- a/protobuf_deps.bzl +++ b/protobuf_deps.bzl @@ -102,8 +102,8 @@ def protobuf_deps(): _github_archive( name = "rules_python", repo = "https://github.com/bazelbuild/rules_python", - commit = "912a5051f51581784fd64094f6bdabf93f6d698f", # 0.14.0 - sha256 = "a3e4b4ade7c4a52e757b16a16e94d0b2640333062180cba577d81fac087a501d", + commit = "02b521fce3c7b36b05813aa986d72777cc3ee328", # 0.24.0 + sha256 = "f9e4f6acf82449324d56669bda4bdb28b48688ad2990d8b39fa5b93ed39c9ad1", ) if not native.existing_rule("rules_ruby"): diff --git a/src/google/protobuf/any.pb.h b/src/google/protobuf/any.pb.h index 59c766aafa3d..ab8010c429d4 100644 --- a/src/google/protobuf/any.pb.h +++ b/src/google/protobuf/any.pb.h @@ -281,7 +281,7 @@ class PROTOBUF_EXPORT Any final : ::google::protobuf::internal::ArenaStringPtr value_; mutable ::google::protobuf::internal::CachedSize _cached_size_; ::google::protobuf::internal::AnyMetadata _any_metadata_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fany_2eproto; diff --git a/src/google/protobuf/api.pb.h b/src/google/protobuf/api.pb.h index b0269a78679e..e3e69fa468c5 100644 --- a/src/google/protobuf/api.pb.h +++ b/src/google/protobuf/api.pb.h @@ -343,7 +343,7 @@ class PROTOBUF_EXPORT Api final : ::google::protobuf::internal::ArenaStringPtr version_; ::google::protobuf::SourceContext* source_context_; int syntax_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fapi_2eproto; @@ -599,7 +599,7 @@ class PROTOBUF_EXPORT Method final : bool response_streaming_; int syntax_; mutable ::google::protobuf::internal::CachedSize _cached_size_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fapi_2eproto; @@ -781,7 +781,7 @@ class PROTOBUF_EXPORT Mixin final : ::google::protobuf::internal::ArenaStringPtr name_; ::google::protobuf::internal::ArenaStringPtr root_; mutable ::google::protobuf::internal::CachedSize _cached_size_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fapi_2eproto; diff --git a/src/google/protobuf/compiler/cpp/message.cc b/src/google/protobuf/compiler/cpp/message.cc index b9dfb7a70e77..ea64c92be58e 100644 --- a/src/google/protobuf/compiler/cpp/message.cc +++ b/src/google/protobuf/compiler/cpp/message.cc @@ -1824,7 +1824,7 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* p) { } // For detecting when concurrent accessor calls cause races. - format("PROTOBUF_TSAN_DECLARE_MEMBER;\n"); + format("PROTOBUF_TSAN_DECLARE_MEMBER\n"); format.Outdent(); format("};\n"); diff --git a/src/google/protobuf/compiler/cpp/message_size_unittest.cc b/src/google/protobuf/compiler/cpp/message_size_unittest.cc index d05238b7e118..7dd2c6979e90 100644 --- a/src/google/protobuf/compiler/cpp/message_size_unittest.cc +++ b/src/google/protobuf/compiler/cpp/message_size_unittest.cc @@ -112,7 +112,7 @@ TEST(GeneratedMessageTest, EmptyMessageWithExtensionsSize) { struct MockGenerated : public MockMessageBase { // 16 bytes MockExtensionSet extensions; // 24 bytes int cached_size; // 4 bytes - PROTOBUF_TSAN_DECLARE_MEMBER; // 0-4 bytes + PROTOBUF_TSAN_DECLARE_MEMBER // 0-4 bytes // + 0-4 bytes of padding }; ABSL_CHECK_MESSAGE_SIZE(MockGenerated, 48); @@ -126,7 +126,7 @@ TEST(GeneratedMessageTest, RecursiveMessageSize) { int cached_size; // 4 bytes void* a; // 8 bytes int32_t i; // 4 bytes - PROTOBUF_TSAN_DECLARE_MEMBER; // 0-4 bytes + PROTOBUF_TSAN_DECLARE_MEMBER // 0-4 bytes // + 0-4 bytes padding }; ABSL_CHECK_MESSAGE_SIZE(MockGenerated, 40); @@ -138,9 +138,9 @@ TEST(GeneratedMessageTest, OneStringSize) { struct MockGenerated : public MockMessageBase { // 16 bytes int has_bits[1]; // 4 bytes int cached_size; // 4 bytes - PROTOBUF_TSAN_DECLARE_MEMBER; // 0-4 bytes - // + 0-4 bytes padding - void* data; // 8 bytes + PROTOBUF_TSAN_DECLARE_MEMBER // 0-4 bytes + // + 0-4 bytes padding + void* data; // 8 bytes }; ABSL_CHECK_MESSAGE_SIZE(MockGenerated, 32); EXPECT_EQ(sizeof(protobuf_unittest::OneString), sizeof(MockGenerated)); @@ -149,9 +149,9 @@ TEST(GeneratedMessageTest, OneStringSize) { TEST(GeneratedMessageTest, MoreStringSize) { struct MockGenerated : public MockMessageBase { // 16 bytes int cached_size; // 4 bytes - PROTOBUF_TSAN_DECLARE_MEMBER; // 0-4 bytes - // + 0-4 bytes padding - MockRepeatedPtrField data; // 24 bytes + PROTOBUF_TSAN_DECLARE_MEMBER // 0-4 bytes + // + 0-4 bytes padding + MockRepeatedPtrField data; // 24 bytes }; ABSL_CHECK_MESSAGE_SIZE(MockGenerated, 48); EXPECT_EQ(sizeof(protobuf_unittest::MoreString), sizeof(MockGenerated)); @@ -161,9 +161,9 @@ TEST(GeneratedMessageTest, Int32MessageSize) { struct MockGenerated : public MockMessageBase { // 16 bytes int has_bits[1]; // 4 bytes int cached_size; // 4 bytes - PROTOBUF_TSAN_DECLARE_MEMBER; // 0-4 bytes - // + 0-4 bytes padding - int32_t data; // 4 bytes + PROTOBUF_TSAN_DECLARE_MEMBER // 0-4 bytes + // + 0-4 bytes padding + int32_t data; // 4 bytes }; ABSL_CHECK_MESSAGE_SIZE(MockGenerated, 32); EXPECT_EQ(sizeof(protobuf_unittest::Int32Message), sizeof(MockGenerated)); @@ -173,9 +173,9 @@ TEST(GeneratedMessageTest, Int64MessageSize) { struct MockGenerated : public MockMessageBase { // 16 bytes int has_bits[1]; // 4 bytes int cached_size; // 4 bytes - PROTOBUF_TSAN_DECLARE_MEMBER; // 0-4 bytes - // + 0-4 bytes padding - int64_t data; // 8 bytes + PROTOBUF_TSAN_DECLARE_MEMBER // 0-4 bytes + // + 0-4 bytes padding + int64_t data; // 8 bytes }; ABSL_CHECK_MESSAGE_SIZE(MockGenerated, 32); EXPECT_EQ(sizeof(protobuf_unittest::Int64Message), sizeof(MockGenerated)); @@ -185,9 +185,9 @@ TEST(GeneratedMessageTest, BoolMessageSize) { struct MockGenerated : public MockMessageBase { // 16 bytes int has_bits[1]; // 4 bytes int cached_size; // 4 bytes - PROTOBUF_TSAN_DECLARE_MEMBER; // 0-4 bytes - // + 0-4 bytes padding - bool data; // 1 byte + PROTOBUF_TSAN_DECLARE_MEMBER // 0-4 bytes + // + 0-4 bytes padding + bool data; // 1 byte // + 3 bytes padding }; ABSL_CHECK_MESSAGE_SIZE(MockGenerated, 32); @@ -198,9 +198,9 @@ TEST(GeneratedMessageTest, OneofSize) { struct MockGenerated : public MockMessageBase { // 16 bytes void* foo; // 8 bytes int cached_size; // 4 bytes - PROTOBUF_TSAN_DECLARE_MEMBER; // 0-4 bytes - // + 0-4 bytes padding - uint32_t oneof_case[1]; // 4 bytes + PROTOBUF_TSAN_DECLARE_MEMBER // 0-4 bytes + // + 0-4 bytes padding + uint32_t oneof_case[1]; // 4 bytes }; ABSL_CHECK_MESSAGE_SIZE(MockGenerated, 32); EXPECT_EQ(sizeof(protobuf_unittest::TestOneof), sizeof(MockGenerated)); @@ -210,9 +210,9 @@ TEST(GeneratedMessageTest, Oneof2Size) { struct MockGenerated : public MockMessageBase { // 16 bytes int has_bits[1]; // 4 bytes int cached_size; // 4 bytes - PROTOBUF_TSAN_DECLARE_MEMBER; // 0-4 bytes - // + 0-4 bytes padding - void* baz_string; // 8 bytes + PROTOBUF_TSAN_DECLARE_MEMBER // 0-4 bytes + // + 0-4 bytes padding + void* baz_string; // 8 bytes int32_t baz_int; // 4 bytes // + 4 bytes padding void* foo; // 8 bytes @@ -232,7 +232,7 @@ TEST(GeneratedMessageTest, FieldOrderingsSize) { void* optional_nested_message; // 8 bytes int64_t my_int; // 8 bytes float my_float; // 4 bytes - PROTOBUF_TSAN_DECLARE_MEMBER; // 0-4 bytes + PROTOBUF_TSAN_DECLARE_MEMBER // 0-4 bytes // + 0-4 bytes padding }; ABSL_CHECK_MESSAGE_SIZE(MockGenerated, 80); @@ -244,9 +244,9 @@ TEST(GeneratedMessageTest, TestMessageSize) { struct MockGenerated : public MockMessageBase { // 16 bytes int has_bits[1]; // 4 bytes int cached_size; // 4 bytes - PROTOBUF_TSAN_DECLARE_MEMBER; // 0-4 bytes - // + 0-4 bytes padding - void* m4; // 8 bytes + PROTOBUF_TSAN_DECLARE_MEMBER // 0-4 bytes + // + 0-4 bytes padding + void* m4; // 8 bytes int64_t m2; // 8 bytes bool m1; // 1 bytes bool m3; // 1 bytes @@ -282,7 +282,7 @@ TEST(GeneratedMessageTest, PackedTypesSize) { MockRepeatedField packed_enum; // 16 bytes int packed_enum_cached_byte_size; // 4 bytes int cached_size; // 4 bytes - PROTOBUF_TSAN_DECLARE_MEMBER; // 0-4 bytes + PROTOBUF_TSAN_DECLARE_MEMBER // 0-4 bytes // + 0-4 bytes padding }; ABSL_CHECK_MESSAGE_SIZE(MockGenerated, 16 * 15 + 8 * 6 + 8); diff --git a/src/google/protobuf/compiler/plugin.pb.h b/src/google/protobuf/compiler/plugin.pb.h index 69055c43df60..b8392da29fa8 100644 --- a/src/google/protobuf/compiler/plugin.pb.h +++ b/src/google/protobuf/compiler/plugin.pb.h @@ -317,7 +317,7 @@ class PROTOC_EXPORT Version final : ::int32_t major_; ::int32_t minor_; ::int32_t patch_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fcompiler_2fplugin_2eproto; @@ -570,7 +570,7 @@ class PROTOC_EXPORT CodeGeneratorRequest final : ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto > source_file_descriptors_; ::google::protobuf::internal::ArenaStringPtr parameter_; ::google::protobuf::compiler::Version* compiler_version_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fcompiler_2fplugin_2eproto; @@ -791,7 +791,7 @@ class PROTOC_EXPORT CodeGeneratorResponse_File final : ::google::protobuf::internal::ArenaStringPtr insertion_point_; ::google::protobuf::internal::ArenaStringPtr content_; ::google::protobuf::GeneratedCodeInfo* generated_code_info_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fcompiler_2fplugin_2eproto; @@ -1013,7 +1013,7 @@ class PROTOC_EXPORT CodeGeneratorResponse final : ::google::protobuf::RepeatedPtrField< ::google::protobuf::compiler::CodeGeneratorResponse_File > file_; ::google::protobuf::internal::ArenaStringPtr error_; ::uint64_t supported_features_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fcompiler_2fplugin_2eproto; diff --git a/src/google/protobuf/cpp_features.pb.h b/src/google/protobuf/cpp_features.pb.h index 57ae0b28e667..243d753aa32e 100644 --- a/src/google/protobuf/cpp_features.pb.h +++ b/src/google/protobuf/cpp_features.pb.h @@ -225,7 +225,7 @@ class PROTOBUF_EXPORT CppFeatures final : ::google::protobuf::internal::HasBits<1> _has_bits_; mutable ::google::protobuf::internal::CachedSize _cached_size_; bool legacy_closed_enum_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fcpp_5ffeatures_2eproto; diff --git a/src/google/protobuf/descriptor.pb.h b/src/google/protobuf/descriptor.pb.h index c77b83dc9760..04dcfa8609f3 100644 --- a/src/google/protobuf/descriptor.pb.h +++ b/src/google/protobuf/descriptor.pb.h @@ -809,7 +809,7 @@ class PROTOBUF_EXPORT FileDescriptorSet final : struct Impl_ { ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto > file_; mutable ::google::protobuf::internal::CachedSize _cached_size_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; @@ -1216,7 +1216,7 @@ class PROTOBUF_EXPORT FileDescriptorProto final : ::google::protobuf::internal::ArenaStringPtr edition_; ::google::protobuf::FileOptions* options_; ::google::protobuf::SourceCodeInfo* source_code_info_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; @@ -1406,7 +1406,7 @@ class PROTOBUF_EXPORT DescriptorProto_ExtensionRange final : ::google::protobuf::ExtensionRangeOptions* options_; ::int32_t start_; ::int32_t end_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; @@ -1579,7 +1579,7 @@ class PROTOBUF_EXPORT DescriptorProto_ReservedRange final : mutable ::google::protobuf::internal::CachedSize _cached_size_; ::int32_t start_; ::int32_t end_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; @@ -1935,7 +1935,7 @@ class PROTOBUF_EXPORT DescriptorProto final : ::google::protobuf::RepeatedPtrField reserved_name_; ::google::protobuf::internal::ArenaStringPtr name_; ::google::protobuf::MessageOptions* options_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; @@ -2159,7 +2159,7 @@ class PROTOBUF_EXPORT ExtensionRangeOptions_Declaration final : ::int32_t number_; bool reserved_; bool repeated_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; @@ -2551,7 +2551,7 @@ class PROTOBUF_EXPORT ExtensionRangeOptions final : ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption > uninterpreted_option_; ::google::protobuf::FeatureSet* features_; int verification_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; @@ -2932,7 +2932,7 @@ class PROTOBUF_EXPORT FieldDescriptorProto final : bool proto3_optional_; int label_; int type_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; @@ -3115,7 +3115,7 @@ class PROTOBUF_EXPORT OneofDescriptorProto final : mutable ::google::protobuf::internal::CachedSize _cached_size_; ::google::protobuf::internal::ArenaStringPtr name_; ::google::protobuf::OneofOptions* options_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; @@ -3288,7 +3288,7 @@ class PROTOBUF_EXPORT EnumDescriptorProto_EnumReservedRange final : mutable ::google::protobuf::internal::CachedSize _cached_size_; ::int32_t start_; ::int32_t end_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; @@ -3543,7 +3543,7 @@ class PROTOBUF_EXPORT EnumDescriptorProto final : ::google::protobuf::RepeatedPtrField reserved_name_; ::google::protobuf::internal::ArenaStringPtr name_; ::google::protobuf::EnumOptions* options_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; @@ -3739,7 +3739,7 @@ class PROTOBUF_EXPORT EnumValueDescriptorProto final : ::google::protobuf::internal::ArenaStringPtr name_; ::google::protobuf::EnumValueOptions* options_; ::int32_t number_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; @@ -3942,7 +3942,7 @@ class PROTOBUF_EXPORT ServiceDescriptorProto final : ::google::protobuf::RepeatedPtrField< ::google::protobuf::MethodDescriptorProto > method_; ::google::protobuf::internal::ArenaStringPtr name_; ::google::protobuf::ServiceOptions* options_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; @@ -4189,7 +4189,7 @@ class PROTOBUF_EXPORT MethodDescriptorProto final : ::google::protobuf::MethodOptions* options_; bool client_streaming_; bool server_streaming_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; @@ -4867,7 +4867,7 @@ class PROTOBUF_EXPORT FileOptions final : bool deprecated_; int optimize_for_; bool cc_enable_arenas_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; @@ -5269,7 +5269,7 @@ class PROTOBUF_EXPORT MessageOptions final : bool deprecated_; bool map_entry_; bool deprecated_legacy_json_field_conflicts_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; @@ -5454,7 +5454,7 @@ class PROTOBUF_EXPORT FieldOptions_EditionDefault final : mutable ::google::protobuf::internal::CachedSize _cached_size_; ::google::protobuf::internal::ArenaStringPtr edition_; ::google::protobuf::internal::ArenaStringPtr value_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; @@ -6042,7 +6042,7 @@ class PROTOBUF_EXPORT FieldOptions final : bool weak_; bool debug_redact_; int retention_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; @@ -6379,7 +6379,7 @@ class PROTOBUF_EXPORT OneofOptions final : mutable ::google::protobuf::internal::CachedSize _cached_size_; ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption > uninterpreted_option_; ::google::protobuf::FeatureSet* features_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; @@ -6755,7 +6755,7 @@ class PROTOBUF_EXPORT EnumOptions final : bool allow_alias_; bool deprecated_; bool deprecated_legacy_json_field_conflicts_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; @@ -7118,7 +7118,7 @@ class PROTOBUF_EXPORT EnumValueOptions final : ::google::protobuf::FeatureSet* features_; bool deprecated_; bool debug_redact_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; @@ -7468,7 +7468,7 @@ class PROTOBUF_EXPORT ServiceOptions final : ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption > uninterpreted_option_; ::google::protobuf::FeatureSet* features_; bool deprecated_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; @@ -7852,7 +7852,7 @@ class PROTOBUF_EXPORT MethodOptions final : ::google::protobuf::FeatureSet* features_; bool deprecated_; int idempotency_level_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; @@ -8031,7 +8031,7 @@ class PROTOBUF_EXPORT UninterpretedOption_NamePart final : mutable ::google::protobuf::internal::CachedSize _cached_size_; ::google::protobuf::internal::ArenaStringPtr name_part_; bool is_extension_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; @@ -8296,7 +8296,7 @@ class PROTOBUF_EXPORT UninterpretedOption final : ::uint64_t positive_int_value_; ::int64_t negative_int_value_; double double_value_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; @@ -8819,7 +8819,7 @@ class PROTOBUF_EXPORT FeatureSet final : int string_field_validation_; int message_encoding_; int json_format_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; @@ -9076,7 +9076,7 @@ class PROTOBUF_EXPORT SourceCodeInfo_Location final : ::google::protobuf::RepeatedPtrField leading_detached_comments_; ::google::protobuf::internal::ArenaStringPtr leading_comments_; ::google::protobuf::internal::ArenaStringPtr trailing_comments_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; @@ -9244,7 +9244,7 @@ class PROTOBUF_EXPORT SourceCodeInfo final : struct Impl_ { ::google::protobuf::RepeatedPtrField< ::google::protobuf::SourceCodeInfo_Location > location_; mutable ::google::protobuf::internal::CachedSize _cached_size_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; @@ -9491,7 +9491,7 @@ class PROTOBUF_EXPORT GeneratedCodeInfo_Annotation final : ::int32_t begin_; ::int32_t end_; int semantic_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; @@ -9659,7 +9659,7 @@ class PROTOBUF_EXPORT GeneratedCodeInfo final : struct Impl_ { ::google::protobuf::RepeatedPtrField< ::google::protobuf::GeneratedCodeInfo_Annotation > annotation_; mutable ::google::protobuf::internal::CachedSize _cached_size_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; diff --git a/src/google/protobuf/duration.pb.h b/src/google/protobuf/duration.pb.h index 3e2da3eac6a9..b17664d89fe5 100644 --- a/src/google/protobuf/duration.pb.h +++ b/src/google/protobuf/duration.pb.h @@ -233,7 +233,7 @@ class PROTOBUF_EXPORT Duration final : ::int64_t seconds_; ::int32_t nanos_; mutable ::google::protobuf::internal::CachedSize _cached_size_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fduration_2eproto; diff --git a/src/google/protobuf/empty.pb.h b/src/google/protobuf/empty.pb.h index cd0dee5bb6e3..0fd2fae6ac67 100644 --- a/src/google/protobuf/empty.pb.h +++ b/src/google/protobuf/empty.pb.h @@ -190,7 +190,7 @@ class PROTOBUF_EXPORT Empty final : typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; friend struct ::TableStruct_google_2fprotobuf_2fempty_2eproto; }; diff --git a/src/google/protobuf/field_mask.pb.h b/src/google/protobuf/field_mask.pb.h index fe43ff94a6c0..f610606b434a 100644 --- a/src/google/protobuf/field_mask.pb.h +++ b/src/google/protobuf/field_mask.pb.h @@ -239,7 +239,7 @@ class PROTOBUF_EXPORT FieldMask final : struct Impl_ { ::google::protobuf::RepeatedPtrField paths_; mutable ::google::protobuf::internal::CachedSize _cached_size_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2ffield_5fmask_2eproto; diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc index 36a98aa64de5..503e49263c62 100644 --- a/src/google/protobuf/port_def.inc +++ b/src/google/protobuf/port_def.inc @@ -850,12 +850,12 @@ static_assert(PROTOBUF_ABSL_MIN(20230125, 3), *reinterpret_cast(addr) += protobuf_tsan_zero; \ } while (0) #else // PROTOBUF_TSAN -#define PROTOBUF_TSAN_READ(addr) -#define PROTOBUF_TSAN_WRITE(addr) +#define PROTOBUF_TSAN_READ(addr) (void)0 +#define PROTOBUF_TSAN_WRITE(addr) (void)0 #endif // PROTOBUF_TSAN #ifdef PROTOBUF_TSAN -#define PROTOBUF_TSAN_DECLARE_MEMBER ::uint32_t _tsan_detect_race = 0 +#define PROTOBUF_TSAN_DECLARE_MEMBER ::uint32_t _tsan_detect_race = 0; #else #define PROTOBUF_TSAN_DECLARE_MEMBER #endif diff --git a/src/google/protobuf/source_context.pb.h b/src/google/protobuf/source_context.pb.h index d51a2932490b..2a4c46078de7 100644 --- a/src/google/protobuf/source_context.pb.h +++ b/src/google/protobuf/source_context.pb.h @@ -227,7 +227,7 @@ class PROTOBUF_EXPORT SourceContext final : struct Impl_ { ::google::protobuf::internal::ArenaStringPtr file_name_; mutable ::google::protobuf::internal::CachedSize _cached_size_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fsource_5fcontext_2eproto; diff --git a/src/google/protobuf/struct.pb.h b/src/google/protobuf/struct.pb.h index 1d583ca1d69b..a1d0c44e3ee0 100644 --- a/src/google/protobuf/struct.pb.h +++ b/src/google/protobuf/struct.pb.h @@ -300,7 +300,7 @@ class PROTOBUF_EXPORT Struct final : ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE> fields_; mutable ::google::protobuf::internal::CachedSize _cached_size_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fstruct_2eproto; @@ -573,7 +573,7 @@ class PROTOBUF_EXPORT Value final : mutable ::google::protobuf::internal::CachedSize _cached_size_; ::uint32_t _oneof_case_[1]; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fstruct_2eproto; @@ -739,7 +739,7 @@ class PROTOBUF_EXPORT ListValue final : struct Impl_ { ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value > values_; mutable ::google::protobuf::internal::CachedSize _cached_size_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fstruct_2eproto; diff --git a/src/google/protobuf/timestamp.pb.h b/src/google/protobuf/timestamp.pb.h index 5c211642d97b..0d4263c78669 100644 --- a/src/google/protobuf/timestamp.pb.h +++ b/src/google/protobuf/timestamp.pb.h @@ -233,7 +233,7 @@ class PROTOBUF_EXPORT Timestamp final : ::int64_t seconds_; ::int32_t nanos_; mutable ::google::protobuf::internal::CachedSize _cached_size_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2ftimestamp_2eproto; diff --git a/src/google/protobuf/type.pb.h b/src/google/protobuf/type.pb.h index d0f97ca29ff4..a3951f8f68c7 100644 --- a/src/google/protobuf/type.pb.h +++ b/src/google/protobuf/type.pb.h @@ -476,7 +476,7 @@ class PROTOBUF_EXPORT Type final : ::google::protobuf::internal::ArenaStringPtr edition_; ::google::protobuf::SourceContext* source_context_; int syntax_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2ftype_2eproto; @@ -833,7 +833,7 @@ class PROTOBUF_EXPORT Field final : ::int32_t oneof_index_; bool packed_; mutable ::google::protobuf::internal::CachedSize _cached_size_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2ftype_2eproto; @@ -1085,7 +1085,7 @@ class PROTOBUF_EXPORT Enum final : ::google::protobuf::internal::ArenaStringPtr edition_; ::google::protobuf::SourceContext* source_context_; int syntax_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2ftype_2eproto; @@ -1281,7 +1281,7 @@ class PROTOBUF_EXPORT EnumValue final : ::google::protobuf::internal::ArenaStringPtr name_; ::int32_t number_; mutable ::google::protobuf::internal::CachedSize _cached_size_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2ftype_2eproto; @@ -1463,7 +1463,7 @@ class PROTOBUF_EXPORT Option final : mutable ::google::protobuf::internal::CachedSize _cached_size_; ::google::protobuf::internal::ArenaStringPtr name_; ::google::protobuf::Any* value_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2ftype_2eproto; diff --git a/src/google/protobuf/wrappers.pb.h b/src/google/protobuf/wrappers.pb.h index 75e417e62402..2163827bcd94 100644 --- a/src/google/protobuf/wrappers.pb.h +++ b/src/google/protobuf/wrappers.pb.h @@ -245,7 +245,7 @@ class PROTOBUF_EXPORT DoubleValue final : struct Impl_ { double value_; mutable ::google::protobuf::internal::CachedSize _cached_size_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fwrappers_2eproto; @@ -403,7 +403,7 @@ class PROTOBUF_EXPORT FloatValue final : struct Impl_ { float value_; mutable ::google::protobuf::internal::CachedSize _cached_size_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fwrappers_2eproto; @@ -561,7 +561,7 @@ class PROTOBUF_EXPORT Int64Value final : struct Impl_ { ::int64_t value_; mutable ::google::protobuf::internal::CachedSize _cached_size_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fwrappers_2eproto; @@ -719,7 +719,7 @@ class PROTOBUF_EXPORT UInt64Value final : struct Impl_ { ::uint64_t value_; mutable ::google::protobuf::internal::CachedSize _cached_size_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fwrappers_2eproto; @@ -877,7 +877,7 @@ class PROTOBUF_EXPORT Int32Value final : struct Impl_ { ::int32_t value_; mutable ::google::protobuf::internal::CachedSize _cached_size_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fwrappers_2eproto; @@ -1035,7 +1035,7 @@ class PROTOBUF_EXPORT UInt32Value final : struct Impl_ { ::uint32_t value_; mutable ::google::protobuf::internal::CachedSize _cached_size_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fwrappers_2eproto; @@ -1193,7 +1193,7 @@ class PROTOBUF_EXPORT BoolValue final : struct Impl_ { bool value_; mutable ::google::protobuf::internal::CachedSize _cached_size_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fwrappers_2eproto; @@ -1357,7 +1357,7 @@ class PROTOBUF_EXPORT StringValue final : struct Impl_ { ::google::protobuf::internal::ArenaStringPtr value_; mutable ::google::protobuf::internal::CachedSize _cached_size_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fwrappers_2eproto; @@ -1521,7 +1521,7 @@ class PROTOBUF_EXPORT BytesValue final : struct Impl_ { ::google::protobuf::internal::ArenaStringPtr value_; mutable ::google::protobuf::internal::CachedSize _cached_size_; - PROTOBUF_TSAN_DECLARE_MEMBER; + PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_google_2fprotobuf_2fwrappers_2eproto;