Commit Graph

8002 Commits

Author SHA1 Message Date
Jiro Nishiguchi
8d1d530c51 Fix typo in docs/implementing_proto3_presence.md 2021-03-08 11:13:03 -08:00
Adam Cozzette
35bdcabdd6
Merge pull request #8383 from protocolbuffers/3.15.x
Merge 3.15.x into master
2021-03-05 07:28:48 -08:00
Adam Cozzette
673971834c
Merge branch 'master' into 3.15.x 2021-03-04 17:53:03 -08:00
Adam Cozzette
4fff47a418 Update protobuf version 2021-03-04 13:35:04 -08:00
Adam Cozzette
5702d51ec0 Updated CHANGES.txt and PHP release notes for 3.15.5 2021-03-04 13:35:04 -08:00
Alexander Shadchin
87dd07b436
Switch on "new" buffer API (#8339)
"Old" buffer API will removed in Python 3.10. This is also fix #7930.
2021-03-04 11:00:41 -08:00
Florian Simon
b9a036b444 Do not disable RTTI by default in the CMake build 2021-03-04 10:18:33 -08:00
Joshua Haberman
72b02b56ea
Merge pull request #8379 from haberman/quadratic-mem-fix
Fixed quadratic memory use in array append for PHP and Ruby.
2021-03-04 10:17:03 -08:00
Elliotte Rusty Harold
b6facc69ea docs: update version 2021-03-04 09:30:23 -08:00
Joshua Haberman
9b5e357df5 Fixed quadratic memory use in array append for PHP and Ruby. 2021-03-04 09:12:29 -08:00
Adam Cozzette
c4a77dad71
Merge pull request #8370 from acozzette/3.15.x-202103031418
Merge 3.15.x into master
2021-03-03 15:58:01 -08:00
Yannic
82f5ecd955 Revert "[bazel] Flip --incompatible_use_com_google_googletest"
This reverts commit 85e5204517.
2021-03-03 15:30:00 -08:00
Adam Cozzette
541b1735a8
Merge branch 'master' into 3.15.x-202103031418 2021-03-03 15:01:11 -08:00
Joshua Haberman
27f4e8b5d9
Merge pull request #8350 from haberman/sync-stage
Integrate from Piper for C++, Java, and Python
2021-03-03 14:59:34 -08:00
Adam Cozzette
13fa25013a Merge branch '3.15.x' into 3.15.x-202103031418 2021-03-03 14:29:11 -08:00
Joshua Haberman
33905ec87b Fixed the Java Lite build. 2021-03-03 12:36:13 -08:00
Adam Cozzette
fd8aabf32d Update protobuf version 2021-03-03 11:37:48 -08:00
Adam Cozzette
e5c067f81b Updated CHANGES.txt and PHP changelog for 3.15.4 release 2021-03-03 11:37:48 -08:00
Antony Dovgal
aa41d9005b read_property() handler is not supposed to return NULL
NULL is never expected as a result of read_property() handler,
it should return &EG(uninitialized_zval) if there is no such property in
the object
2021-03-03 11:32:58 -08:00
Joshua Haberman
4baed791f5
Merge pull request #8362 from tony2001/read_property_crash_fixed
read_property() handler is not supposed to return NULL
2021-03-03 10:14:31 -08:00
Joshua Haberman
cf7d81f88c
Merge pull request #8363 from haberman/ruby-nil-fix
Fixed SEGV when users pass nil messages. This also disallows `nil` in RepeatedField or Map.
2021-03-02 17:26:46 -08:00
Joshua Haberman
7d63b996e1 Removed compatibility test that tries to append "nil" to repeated field. 2021-03-02 15:20:06 -08:00
Joshua Haberman
069f989b48
Merge pull request #8364 from haberman/ruby-memory-footprint
[Ruby] Fixed quadratic memory usage when appending to arrays.
2021-03-02 15:17:13 -08:00
Florian Simon
1add7a7bd6 Create a CMake option to control whether or not RTTI is enabled
This is useful for Conan recipes that build Protobuf, in which
whatever we want to enable has to be enabled in the initial command line.
Without this, the people maintaining the recipe have to patch the CMake
setup of Protobuf before building the binaries.

Closes #5541
2021-03-02 13:47:05 -08:00
Joshua Haberman
88243e45fc [Ruby] Fixed quadratic memory usage when appending to arrays.
The code mistakenly called realloc() instead of resize() on every
array append, causing quadratic memory usage.
2021-03-02 13:37:47 -08:00
Joshua Haberman
dfa54577d6 [Ruby] Fixed SEGV when users pass nil messages. 2021-03-02 12:44:16 -08:00
Antony Dovgal
2e7771d7a0 read_property() handler is not supposed to return NULL
NULL is never expected as a result of read_property() handler,
it should return &EG(uninitialized_zval) if there is no such property in
the object
2021-03-02 22:49:24 +03:00
Yannic
85e5204517 [bazel] Flip --incompatible_use_com_google_googletest 2021-03-02 11:17:52 -08:00
Po-Chuan Hsieh
3172ab8ff9 Fix endian.h location on FreeBSD 2021-03-02 11:10:46 -08:00
Florian Simon
a4e7b97bd6 Create a CMake option to control whether or not RTTI is enabled
This is useful for Conan recipes that build Protobuf, in which
whatever we want to enable has to be enabled in the initial command line.
Without this, the people maintaining the recipe have to patch the CMake
setup of Protobuf before building the binaries.

Closes #5541
2021-03-02 11:09:28 -08:00
Anton Danielsson
630028a4c6 Fix cmake install on iOS
Fixes:
INSTALL TARGETS given no BUNDLE DESTINATION for MACOSX_BUNDLE executable
2021-03-01 17:32:31 -08:00
Romain Geissler
9d203953a9 Fix gcc error: comparison of unsigned expression in '>= 0' is always true [-Werror=type-limits]
This fixes the following build error:
In file included from no_warning_test.cc:7:
../../src/google/protobuf/parse_context.h: In instantiation of 'const char* google::protobuf::internal::EpsCopyInputStream::AppendUntilEnd(const char*, const A&) [with A = google::protobuf::internal::EpsCopyInputStream::AppendString(const char*, std::string*)::<lambda(const char*, ptrdiff_t)>]':
../../src/google/protobuf/parse_context.h:366:70:   required from here
../../src/google/protobuf/stubs/logging.h:161:48: error: comparison of unsigned expression in '>= 0' is always true [-Werror=type-limits]
  161 | #define GOOGLE_CHECK_GE(A, B) GOOGLE_CHECK((A) >= (B))
      |                                                ^
../../src/google/protobuf/stubs/logging.h:151:5: note: in definition of macro 'GOOGLE_LOG_IF'
  151 |   !(CONDITION) ? (void)0 : GOOGLE_LOG(LEVEL)
      |     ^~~~~~~~~
../../src/google/protobuf/stubs/logging.h:161:31: note: in expansion of macro 'GOOGLE_CHECK'
  161 | #define GOOGLE_CHECK_GE(A, B) GOOGLE_CHECK((A) >= (B))
      |                               ^~~~~~~~~~~~
../../src/google/protobuf/stubs/logging.h:201:26: note: in expansion of macro 'GOOGLE_CHECK_GE'
  201 | #define GOOGLE_DCHECK_GE GOOGLE_CHECK_GE
      |                          ^~~~~~~~~~~~~~~
../../src/google/protobuf/parse_context.h:351:7: note: in expansion of macro 'GOOGLE_DCHECK_GE'
  351 |       GOOGLE_DCHECK_GE(chunk_size, static_cast<size_t>(0));
      |       ^~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
2021-03-01 16:38:00 -08:00
Yannic
88367afa1f
[C++] Delete StringPiecePod (#8353)
Protobuf no longer supports C++ < 11, so this type is no longer
required.
2021-03-01 16:29:00 -08:00
Yuriy Chernyshov
e9091e6d8c
Fix some constness / char literal issues being found by MSVC standard conforming mode (#8344)
* Fix some constness / char literal issues being found by MSVC standard conforming mode

* Switch to const_cast from C-style casts
2021-03-01 12:59:39 -08:00
Joshua Haberman
f645c7ed07 Fixed spelling errors surfaced by CodeSpell. 2021-02-26 10:54:13 -08:00
Joshua Haberman
d6f0c9b187 Updated changelog. 2021-02-26 10:45:41 -08:00
Joshua Haberman
899c276248 Merge tag 'refs/tags/sync-piper' into sync-stage 2021-02-26 10:37:38 -08:00
Joshua Haberman
9df42757f9 Sync from Piper @359788468
PROTOBUF_SYNC_PIPER
2021-02-26 10:37:37 -08:00
Adam Cozzette
8080bebf1f
Merge pull request #8348 from acozzette/3.15.x-202102251545
Merge 3.15.x into master
2021-02-25 17:02:41 -08:00
Adam Cozzette
e54403190b Merge branch '3.15.x' into 3.15.x-202102251545 2021-02-25 15:54:09 -08:00
Adam Cozzette
983d115bd9 Update protobuf version 2021-02-25 09:20:20 -08:00
Adam Cozzette
eb542e606b Updated CHANGES.txt for 3.15.3 release 2021-02-25 09:19:24 -08:00
Joshua Haberman
80ec787928
Merge pull request #8341 from haberman/ruby-2.5-gc
Ruby <2.7now uses WeakMap too, which prevents memory leaks.
2021-02-24 17:49:02 -08:00
Adam Cozzette
a6c28fb207
Merge pull request #8338 from acozzette/3.15.x-202102231541
Merge 3.15.x into master
2021-02-24 16:46:27 -08:00
Joshua Haberman
9879f423ff Ruby <2.7now uses WeakMap too, which prevents memory leaks.
Ruby <2.7 does not allow non-finalizable objects to be WeakMap
keys: https://bugs.ruby-lang.org/issues/16035

We work around this by using a secondary map for Ruby <2.7 which
maps the non-finalizable integer to a distinct object.

For now we accept that the entries in the secondary map wil never
be collected.  If this becomes a problem we can perform a GC pass
every so often that looks at the contents of the object cache to
decide what can be deleted from the secondary map.
2021-02-24 16:41:35 -08:00
Adam Cozzette
d8254a67ce Merge branch '3.15.x' into 3.15.x-202102231541 2021-02-23 15:51:34 -08:00
Adam Cozzette
d7e943b8d2 Update protobuf version 2021-02-23 13:21:42 -08:00
Adam Cozzette
1af4657b80 Updated CHANGES.txt 2021-02-23 13:21:42 -08:00
Yuriy Chernyshov
09f94e7311 Fix PROTOBUF_CONSTINIT macro redifinition
The #ifdef block is duplicated with the above (which was fixed in 3.15.1).

It would be great to have this fix backported to 3.15.1 (and released as 3.15.2).
2021-02-23 13:21:27 -08:00
Adam Cozzette
a43ddfbd56
Merge pull request #8323 from georgthegreat/patch-1
Fix PROTOBUF_CONSTINIT macro redefinition
2021-02-23 11:20:03 -08:00