diff --git a/CHANGES.txt b/CHANGES.txt
index 14b9b3a7aec9..4573c0a6d5da 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -13,6 +13,18 @@ Unreleased Changes (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
Java:
* Exceptions thrown while reading from an InputStream in parseFrom are now included as causes.
+2021-03-02 version 3.15.4 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
+
+ Ruby
+ * Fixed SEGV when users pass nil messages (#8363)
+ * Fixed quadratic memory usage when appending to arrays (#8364)
+
+ C++
+ * Create a CMake option to control whether or not RTTI is enabled (#8361)
+
+ PHP
+ * read_property() handler is not supposed to return NULL (#8362)
+
2021-02-25 version 3.15.3 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
Ruby
diff --git a/Protobuf-C++.podspec b/Protobuf-C++.podspec
index 1f35b0a14652..829f90a9df55 100644
--- a/Protobuf-C++.podspec
+++ b/Protobuf-C++.podspec
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'Protobuf-C++'
- s.version = '3.15.3'
+ s.version = '3.15.4'
s.summary = 'Protocol Buffers v3 runtime library for C++.'
s.homepage = 'https://github.com/google/protobuf'
s.license = '3-Clause BSD License'
diff --git a/Protobuf.podspec b/Protobuf.podspec
index b2958e02834f..d4610db4e9fa 100644
--- a/Protobuf.podspec
+++ b/Protobuf.podspec
@@ -5,7 +5,7 @@
# dependent projects use the :git notation to refer to the library.
Pod::Spec.new do |s|
s.name = 'Protobuf'
- s.version = '3.15.3'
+ s.version = '3.15.4'
s.summary = 'Protocol Buffers v.3 runtime library for Objective-C.'
s.homepage = 'https://github.com/protocolbuffers/protobuf'
s.license = '3-Clause BSD License'
diff --git a/configure.ac b/configure.ac
index 2eb58902ddaf..3e74624b8f69 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,7 +17,7 @@ AC_PREREQ(2.59)
# In the SVN trunk, the version should always be the next anticipated release
# version with the "-pre" suffix. (We used to use "-SNAPSHOT" but this pushed
# the size of one file name in the dist tarfile over the 99-char limit.)
-AC_INIT([Protocol Buffers],[3.15.3],[protobuf@googlegroups.com],[protobuf])
+AC_INIT([Protocol Buffers],[3.15.4],[protobuf@googlegroups.com],[protobuf])
AM_MAINTAINER_MODE([enable])
diff --git a/csharp/Google.Protobuf.Tools.nuspec b/csharp/Google.Protobuf.Tools.nuspec
index 60c7fecda99c..7510b105863e 100644
--- a/csharp/Google.Protobuf.Tools.nuspec
+++ b/csharp/Google.Protobuf.Tools.nuspec
@@ -5,7 +5,7 @@
Google Protocol Buffers toolsTools for Protocol Buffers - Google's data interchange format.See project site for more info.
- 3.15.3
+ 3.15.4Google Inc.protobuf-packageshttps://github.com/protocolbuffers/protobuf/blob/master/LICENSE
diff --git a/csharp/src/Google.Protobuf/Google.Protobuf.csproj b/csharp/src/Google.Protobuf/Google.Protobuf.csproj
index 23517d4ca35f..3bdbea455cec 100644
--- a/csharp/src/Google.Protobuf/Google.Protobuf.csproj
+++ b/csharp/src/Google.Protobuf/Google.Protobuf.csproj
@@ -4,7 +4,7 @@
C# runtime library for Protocol Buffers - Google's data interchange format.Copyright 2015, Google Inc.Google Protocol Buffers
- 3.15.3
+ 3.15.47.2Google Inc.
diff --git a/java/bom/pom.xml b/java/bom/pom.xml
index cec091173e11..6c52aa7fa622 100644
--- a/java/bom/pom.xml
+++ b/java/bom/pom.xml
@@ -4,7 +4,7 @@
com.google.protobufprotobuf-bom
- 3.15.3
+ 3.15.4pomProtocol Buffers [BOM]
diff --git a/java/core/pom.xml b/java/core/pom.xml
index 4fc530b9db8e..9a004f33f6e9 100644
--- a/java/core/pom.xml
+++ b/java/core/pom.xml
@@ -4,7 +4,7 @@
com.google.protobufprotobuf-parent
- 3.15.3
+ 3.15.4protobuf-java
diff --git a/java/lite/pom.xml b/java/lite/pom.xml
index 478ba0e15c1f..ac6656087c74 100644
--- a/java/lite/pom.xml
+++ b/java/lite/pom.xml
@@ -4,7 +4,7 @@
com.google.protobufprotobuf-parent
- 3.15.3
+ 3.15.4protobuf-javalite
diff --git a/java/pom.xml b/java/pom.xml
index dc3e89f884fe..736a303e2e9a 100644
--- a/java/pom.xml
+++ b/java/pom.xml
@@ -4,7 +4,7 @@
com.google.protobufprotobuf-parent
- 3.15.3
+ 3.15.4pomProtocol Buffers [Parent]
diff --git a/java/util/pom.xml b/java/util/pom.xml
index 9028b1b2f07f..087882062edc 100644
--- a/java/util/pom.xml
+++ b/java/util/pom.xml
@@ -4,7 +4,7 @@
com.google.protobufprotobuf-parent
- 3.15.3
+ 3.15.4protobuf-java-util
diff --git a/js/package.json b/js/package.json
index b5d23ebcb804..89f0e5636c97 100644
--- a/js/package.json
+++ b/js/package.json
@@ -1,6 +1,6 @@
{
"name": "google-protobuf",
- "version": "3.15.3",
+ "version": "3.15.4",
"description": "Protocol Buffers for JavaScript",
"main": "google-protobuf.js",
"files": [
diff --git a/php/ext/google/protobuf/package.xml b/php/ext/google/protobuf/package.xml
index 75a440cd552c..de622d9410fb 100644
--- a/php/ext/google/protobuf/package.xml
+++ b/php/ext/google/protobuf/package.xml
@@ -10,11 +10,11 @@
protobuf-opensource@google.comyes
- 2021-02-24
-
+ 2021-03-02
+
- 3.15.3
- 3.15.3
+ 3.15.4
+ 3.15.4stable
@@ -22,15 +22,8 @@
3-Clause BSD License
- New changes in 3.15.0:
- * unregister INI entries and fix invalid read on shutdown (#8042)
- * Fix PhpDoc comments for message accessors to include "|null". (#8136)
- * fix: convert native PHP floats to single precision (#8187)
- * Fixed PHP to support field numbers >=2**28. (#8235)
- * feat: add support for deprecated fields to PHP compiler (#8223)
- * Protect against stack overflow if the user derives from Message. (#8248)
- * Fixed clone for Message, RepeatedField, and MapField. (#8245)
- * Updated upb to allow nonzero offset minutes in JSON timestamps. (#8258)
+ New changes in 3.15.4:
+ * read_property() handler is not supposed to return NULL (#8362)
@@ -850,5 +843,20 @@ G A release.
+
+
+ 3.15.4
+ 3.15.4
+
+
+ stable
+ stable
+
+ 2021-03-02
+
+ 3-Clause BSD License
+
+
+
diff --git a/php/ext/google/protobuf/protobuf.h b/php/ext/google/protobuf/protobuf.h
index a03261c29597..889ff0820910 100644
--- a/php/ext/google/protobuf/protobuf.h
+++ b/php/ext/google/protobuf/protobuf.h
@@ -76,7 +76,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_setter, 0, 0, 1)
ZEND_ARG_INFO(0, value)
ZEND_END_ARG_INFO()
-#define PHP_PROTOBUF_VERSION "3.15.3"
+#define PHP_PROTOBUF_VERSION "3.15.4"
// ptr -> PHP object cache. This is a weak map that caches lazily-created
// wrapper objects around upb types:
diff --git a/protoc-artifacts/pom.xml b/protoc-artifacts/pom.xml
index 591ab09284e7..c8dca590e8d5 100644
--- a/protoc-artifacts/pom.xml
+++ b/protoc-artifacts/pom.xml
@@ -8,7 +8,7 @@
com.google.protobufprotoc
- 3.15.3
+ 3.15.4pomProtobuf Compiler
diff --git a/python/google/protobuf/__init__.py b/python/google/protobuf/__init__.py
index 04a5ff6cdb7f..ecd917aa016d 100644
--- a/python/google/protobuf/__init__.py
+++ b/python/google/protobuf/__init__.py
@@ -30,4 +30,4 @@
# Copyright 2007 Google Inc. All Rights Reserved.
-__version__ = '3.15.3'
+__version__ = '3.15.4'
diff --git a/ruby/compatibility_tests/v3.0.0/tests/repeated_field_test.rb b/ruby/compatibility_tests/v3.0.0/tests/repeated_field_test.rb
index b4a158f37ccd..4f70f52dc4a9 100755
--- a/ruby/compatibility_tests/v3.0.0/tests/repeated_field_test.rb
+++ b/ruby/compatibility_tests/v3.0.0/tests/repeated_field_test.rb
@@ -326,18 +326,6 @@ def test_collect!
end
end
- def test_compact!
- m = TestMessage.new
- m.repeated_msg << TestMessage2.new(:foo => 1)
- m.repeated_msg << nil
- m.repeated_msg << TestMessage2.new(:foo => 2)
- reference_arr = m.repeated_string.to_a
-
- check_self_modifying_method(m.repeated_string, reference_arr) do |arr|
- arr.compact!
- end
- end
-
def test_delete
m = TestMessage.new
reference_arr = %w(foo bar baz)
diff --git a/ruby/ext/google/protobuf_c/message.c b/ruby/ext/google/protobuf_c/message.c
index 67f22212c66c..b01741b61cec 100644
--- a/ruby/ext/google/protobuf_c/message.c
+++ b/ruby/ext/google/protobuf_c/message.c
@@ -1250,7 +1250,9 @@ upb_msg* Message_deep_copy(const upb_msg* msg, const upb_msgdef* m,
const upb_msg* Message_GetUpbMessage(VALUE value, const upb_msgdef* m,
const char* name, upb_arena* arena) {
- if (value == Qnil) return NULL;
+ if (value == Qnil) {
+ rb_raise(cTypeError, "nil message not allowed here.");
+ }
VALUE klass = CLASS_OF(value);
VALUE desc_rb = rb_ivar_get(klass, descriptor_instancevar_interned);
diff --git a/ruby/google-protobuf.gemspec b/ruby/google-protobuf.gemspec
index dde0c30183f6..5cec225a70ae 100644
--- a/ruby/google-protobuf.gemspec
+++ b/ruby/google-protobuf.gemspec
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = "google-protobuf"
- s.version = "3.15.3"
+ s.version = "3.15.4"
git_tag = "v#{s.version.to_s.sub('.rc.', '-rc')}" # Converts X.Y.Z.rc.N to vX.Y.Z-rcN, used for the git tag
s.licenses = ["BSD-3-Clause"]
s.summary = "Protocol Buffers"
diff --git a/ruby/tests/basic.rb b/ruby/tests/basic.rb
index 107084e66436..8ddf72b81e4e 100755
--- a/ruby/tests/basic.rb
+++ b/ruby/tests/basic.rb
@@ -52,10 +52,15 @@ def test_issue_8311_crash
outer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("Outer").msgclass
- outer_proto = outer.new(
+ outer.new(
inners: []
- )
- outer_proto['inners'].to_s
+ )['inners'].to_s
+
+ assert_raise Google::Protobuf::TypeError do
+ outer.new(
+ inners: [nil]
+ ).to_s
+ end
end
def test_has_field
diff --git a/ruby/tests/repeated_field_test.rb b/ruby/tests/repeated_field_test.rb
index 6307447bc3f3..1df6e1d4f154 100755
--- a/ruby/tests/repeated_field_test.rb
+++ b/ruby/tests/repeated_field_test.rb
@@ -339,18 +339,6 @@ def test_collect!
end
end
- def test_compact!
- m = TestMessage.new
- m.repeated_msg << TestMessage2.new(:foo => 1)
- m.repeated_msg << nil
- m.repeated_msg << TestMessage2.new(:foo => 2)
- reference_arr = m.repeated_string.to_a
-
- check_self_modifying_method(m.repeated_string, reference_arr) do |arr|
- arr.compact!
- end
- end
-
def test_delete
m = TestMessage.new
reference_arr = %w(foo bar baz)
diff --git a/src/Makefile.am b/src/Makefile.am
index 442b2f11e2d0..c543a600deed 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -18,7 +18,7 @@ else
PTHREAD_DEF =
endif
-PROTOBUF_VERSION = 26:3:0
+PROTOBUF_VERSION = 26:4:0
if GCC
# Turn on all warnings except for sign comparison (we ignore sign comparison
diff --git a/src/google/protobuf/any.pb.h b/src/google/protobuf/any.pb.h
index 5e229efd476f..04186c9a5eb6 100644
--- a/src/google/protobuf/any.pb.h
+++ b/src/google/protobuf/any.pb.h
@@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
-#if 3015003 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3015004 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
diff --git a/src/google/protobuf/api.pb.h b/src/google/protobuf/api.pb.h
index b2ae135823f6..bafd45f26ecb 100644
--- a/src/google/protobuf/api.pb.h
+++ b/src/google/protobuf/api.pb.h
@@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
-#if 3015003 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3015004 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
diff --git a/src/google/protobuf/compiler/plugin.pb.h b/src/google/protobuf/compiler/plugin.pb.h
index 053290d6624d..c5e933c28b88 100644
--- a/src/google/protobuf/compiler/plugin.pb.h
+++ b/src/google/protobuf/compiler/plugin.pb.h
@@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
-#if 3015003 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3015004 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
diff --git a/src/google/protobuf/descriptor.pb.h b/src/google/protobuf/descriptor.pb.h
index e43e967fb463..5501cdafdba1 100644
--- a/src/google/protobuf/descriptor.pb.h
+++ b/src/google/protobuf/descriptor.pb.h
@@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
-#if 3015003 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3015004 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
diff --git a/src/google/protobuf/duration.pb.h b/src/google/protobuf/duration.pb.h
index ee7a1d5ba6d7..835652f2b312 100644
--- a/src/google/protobuf/duration.pb.h
+++ b/src/google/protobuf/duration.pb.h
@@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
-#if 3015003 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3015004 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
diff --git a/src/google/protobuf/empty.pb.h b/src/google/protobuf/empty.pb.h
index d3be351f6b0f..b8f038cb9f0f 100644
--- a/src/google/protobuf/empty.pb.h
+++ b/src/google/protobuf/empty.pb.h
@@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
-#if 3015003 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3015004 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
diff --git a/src/google/protobuf/field_mask.pb.h b/src/google/protobuf/field_mask.pb.h
index 86f9a95da581..4af19e4f57b6 100644
--- a/src/google/protobuf/field_mask.pb.h
+++ b/src/google/protobuf/field_mask.pb.h
@@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
-#if 3015003 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3015004 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc
index 3922b216dbbb..19e69b49b0e1 100644
--- a/src/google/protobuf/port_def.inc
+++ b/src/google/protobuf/port_def.inc
@@ -337,7 +337,7 @@
// Shared google3/opensource definitions. //////////////////////////////////////
-#define PROTOBUF_VERSION 3015003
+#define PROTOBUF_VERSION 3015004
#define PROTOBUF_MIN_HEADER_VERSION_FOR_PROTOC 3015000
#define PROTOBUF_MIN_PROTOC_VERSION 3015000
#define PROTOBUF_VERSION_SUFFIX ""
diff --git a/src/google/protobuf/source_context.pb.h b/src/google/protobuf/source_context.pb.h
index 30b69274bb86..bdd35d061548 100644
--- a/src/google/protobuf/source_context.pb.h
+++ b/src/google/protobuf/source_context.pb.h
@@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
-#if 3015003 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3015004 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
diff --git a/src/google/protobuf/struct.pb.h b/src/google/protobuf/struct.pb.h
index d7357b8f352a..ad5996706767 100644
--- a/src/google/protobuf/struct.pb.h
+++ b/src/google/protobuf/struct.pb.h
@@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
-#if 3015003 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3015004 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
diff --git a/src/google/protobuf/stubs/common.h b/src/google/protobuf/stubs/common.h
index b920b7ff9b69..91df05e7607d 100644
--- a/src/google/protobuf/stubs/common.h
+++ b/src/google/protobuf/stubs/common.h
@@ -82,7 +82,7 @@ namespace internal {
// The current version, represented as a single integer to make comparison
// easier: major * 10^6 + minor * 10^3 + micro
-#define GOOGLE_PROTOBUF_VERSION 3015003
+#define GOOGLE_PROTOBUF_VERSION 3015004
// A suffix string for alpha, beta or rc releases. Empty for stable releases.
#define GOOGLE_PROTOBUF_VERSION_SUFFIX ""
diff --git a/src/google/protobuf/timestamp.pb.h b/src/google/protobuf/timestamp.pb.h
index 773f3c960d95..4ed42e311653 100644
--- a/src/google/protobuf/timestamp.pb.h
+++ b/src/google/protobuf/timestamp.pb.h
@@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
-#if 3015003 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3015004 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
diff --git a/src/google/protobuf/type.pb.h b/src/google/protobuf/type.pb.h
index d33fb4b2bd91..6cb8ecfa64cd 100644
--- a/src/google/protobuf/type.pb.h
+++ b/src/google/protobuf/type.pb.h
@@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
-#if 3015003 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3015004 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
diff --git a/src/google/protobuf/wrappers.pb.h b/src/google/protobuf/wrappers.pb.h
index 4a61feffbfdc..2f177ea6e819 100644
--- a/src/google/protobuf/wrappers.pb.h
+++ b/src/google/protobuf/wrappers.pb.h
@@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
-#if 3015003 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3015004 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.