Commit Graph

7258 Commits

Author SHA1 Message Date
William A Rowe Jr
961c0e6b86 Correct interpretation of utf-8 0xf8-0xff
In consuming this useful string utility, it was discovered
that the interpretation of leading byte codes 0xf8-0xff
did not conform to either the RFC 3629 nor ISO/IEC 10646
definitions of utf-8.

The IETF RFC describes only 1-4 byte encodings (a limited
number of 4 byte encodings at that), and plainly states in
section 1. Introduction;
   o  The octet values C0, C1, F5 to FF never appear.

Alternately, the ISO definition "R.2 Specification of UTF-8"
preseented in the original IETF RFC 2279 clearly define the
meaning of leading byte values F5 through FD, and RFC 3629
Section 10. Security paragraph 3 calls out this alternate
reading (alterative to "never appears".) F5-F7 begin an
invalid (in the domain of unicode code points) 4-byte UTF-8
sequence (similar to F0-F4), while F8-FC begin a 5-byte
sequence, FC and FD begin a 6 byte sequence.

The curent code is wrong in that it doesn't treat the codes
F8-FF as invalid 1-byte characters, nor does it treat the
codes F8-FD as the correct number of bytes. No valid parser
will land these lead characters 4 bytes forward. Most will
treat these as the 5 or 6 byte utf-32 character and may then
treat the resulting character as invalid, while some parsers
may reject all leading F5-FF characters as a single byte of
erronious input, followed by each invalid continuation byte.

We propose the conventional reading of F8-FD as 5 and 6 byte
sequences as originally defined, while FE-FF must be read
as single byte invalid code points.

Signed-off-by: William A Rowe Jr <wrowe@pivotal.io>
Signed-off-by: Yechiel Kalmenson <ykalmenson@pivotal.io>
2019-12-10 13:35:38 -08:00
summerCol
6d087c256c fix typos in benchmarks/README.md 2019-12-10 11:32:44 -08:00
Yannic
4447fcc16f Add --<lang>_opt flag for all built-in generators
Plugins (and some built-in generators) have `--<lang>_opt` flag that
allows passing parameters one-by-one instead of passing them as
`--<lang>_out=<params>:<out_base>`. This PR changes protoc to
allow using `--<lang>_opt` for all (built-in) generators.
2019-12-10 11:26:51 -08:00
Rafi Kamal
b58896e53c
Update CHANGES.txt for 3.11.2 release (#7002) 2019-12-10 11:22:24 -08:00
Paul Yang
a66423f0fd
Make c extension portable for php 7.4 (#6968)
* Make c extension portable for php 7.4

* Fix conformance tests

* Fix comments

* Fix 32-bit

* Update conformance failure list

* Fix compiler warnings

* Cleanup configure created by phpize
The file created in php 7.4 is not recognizable by previous versions

* Fix conformance tests for 64-bit php

* Fix conformance test

* Fix compile warning

* Fix compile warnings
2019-12-09 17:02:10 -08:00
Christian Maurer
b4596f8e99 treat enum,bool as 32bit; shrink ReadVarint32 2019-12-06 14:35:12 -08:00
Christian Maurer
91ed6dcb5b remove win32/64 conversion warning in generated code 2019-12-06 14:35:12 -08:00
Zhao Junwang
c562c93ad6 add -std=c++11 to make it compile
make cpp won't compile since it requires `-std=c++11` com
2019-12-06 11:15:57 -08:00
Asra Ali
8eda7b7faa fix ubsan warnings
Signed-off-by: Asra Ali <asraa@google.com>
2019-12-06 11:15:18 -08:00
Adam Cozzette
16b0c054a1 Allocated a custom option number for Analyze Re Graphene 2019-12-06 10:33:25 -08:00
Florian Enner
2220670ed9 Added 3rd party Java library (QuickBuffers) 2019-12-05 10:48:35 -08:00
Elliotte Rusty Harold
4457b1f290 Update to 3.11.0 in docs
@haberman
2019-12-05 10:36:57 -08:00
Jingwen Chen
51d9876977 Migrate from maven_jar to jvm_maven_import_external to prepare for Bazel 2.0 2019-12-05 10:29:59 -08:00
Jan Tattermusch
20b7fab0a9
Merge pull request #6674 from ObsidianMinor/csharp/general-cleanup
Cleanup various bits of Google.Protobuf
2019-12-05 10:38:10 +01:00
Jan Tattermusch
c8a56342d5
Merge pull request #6938 from ObsidianMinor/csharp/fix/6936
Fix latest ArgumentException for C# extensions
2019-12-05 10:36:47 +01:00
Tomo Suzuki
6396a47d5d Simplifying linkage monitor test setup (#6855) 2019-12-04 09:49:51 -08:00
Eric Anderson
0425fa932c Add a proto_lang_toolchain for javalite (#6882) (#6976)
* Add a proto_lang_toolchain for javalite

* fix toolchain. Swap javalite example to master repo
2019-12-03 13:06:31 -08:00
Paul Yang
2929bb3736
Initialize wrapper message during parsing (#6974)
* Initialize wrapper message during parsing
In case the internal value is default

* Fix zts build
2019-12-03 11:11:28 -08:00
Sydney Acksman
367fd27732 Rename files and revert changes to generate protos script 2019-12-03 10:52:24 -06:00
Sydney Acksman
d5e964c8bb Make test comment a summary 2019-12-03 10:46:34 -06:00
Paul Yang
7bb8b108d1
Add php 7.4 to docker image (#6971) (#6975)
* Add php 7.4 to docker image

* Use https links
2019-12-02 16:05:55 -08:00
Paul Yang
ef210164aa
Add php 7.4 to docker image (#6971)
* Add php 7.4 to docker image

* Use https links
2019-12-02 15:33:05 -08:00
Rafi Kamal
c04d9c984f
Update CHANGES.txt for 3.11.1 release (#6973) 2019-12-02 11:57:40 -08:00
Rafi Kamal
b78c53f935
Update protobuf version to 3.11.1 (#6972) 2019-12-02 11:57:21 -08:00
Sydney Acksman
34f9497162 Use explicit comparer for extension identifiers 2019-12-02 13:56:21 -06:00
Sydney Acksman
1a0ff9551a Add comment and Assert.DoesNotThrow to RequiredFieldsNoThrow 2019-12-02 13:50:51 -06:00
Rafi Kamal
e6c5a3b57d
Add a proto_lang_toolchain for javalite (#6882)
* Add a proto_lang_toolchain for javalite

* fix toolchain. Swap javalite example to master repo
2019-11-27 11:10:45 -08:00
Sydney Acksman
145033c056 Adjust based on review feedback 2019-11-27 11:32:13 -06:00
Paul Yang
e69c939652
Extern declare protobuf_globals (#6946) 2019-11-27 01:00:51 -08:00
Jan Tattermusch
058d5b0d71
Merge pull request #6910 from ObsidianMinor/csharp/conformance-failures
Fix conformance test failures for Google.Protobuf
2019-11-26 17:18:05 +01:00
Rafi Kamal
ab5b61bf2f
Update CHANGES.txt for 3.11.0 stable release (#6944) 2019-11-25 15:15:21 -08:00
Rafi Kamal
1d5375c621
Update protobuf version to 3.11.0 (#6943) 2019-11-25 15:12:00 -08:00
Jan Tattermusch
96e9ff3863 Revert "Revert "C# upgrade dotnet SDK (#6877)" (#6888)" (#6920)
This reverts commit f06800524f.
2019-11-25 11:29:47 -08:00
Sydney Acksman
cd11d5414f Improve test to make sure the extensions are actually loaded for CustomOptions 2019-11-24 14:56:35 -06:00
Sydney Acksman
2b0b838528 Add tests 2019-11-24 14:22:50 -06:00
Sydney Acksman
3c2a32a75f Use Distinct on depended extensions to filter duplicate extensions 2019-11-24 14:22:26 -06:00
Rafi Kamal
b0386daa19
Remove add_proto_enumdesc and get_proto_enumdesc (#6931) 2019-11-22 11:40:56 -08:00
Rafi Kamal
391440e3dd
Implement lazy loading of php class for proto messages (#6911) (#6925)
* Implement lazy loading of php class for proto messages

* Fix php 7.1

* Fix encode

* Fix memory leak

* Fix enum descriptor
2019-11-22 10:06:45 -08:00
Joshua Haberman
a9f390f44e
Merge pull request #6929 from TeBoring/php-bug-fix
Remove add_proto_enumdesc and get_proto_enumdesc
2019-11-22 09:36:26 -08:00
Bo Yang
dbd66dddfb Remove add_proto_enumdesc and get_proto_enumdesc 2019-11-22 06:55:05 +00:00
Rafi Kamal
6220db4ec4
Update protobuf version (#6927) 2019-11-21 19:10:04 -08:00
Paul Yang
6d7bb7e714
Implement lazy loading of php class for proto messages (#6911)
* Implement lazy loading of php class for proto messages

* Fix php 7.1

* Fix encode

* Fix memory leak

* Fix enum descriptor
2019-11-20 20:33:27 -08:00
Rafi Kamal
de75651d7a
Merge 3.11.0-rc1 changes to master (#6917)
* Update CHANGES.txt with 3.11.0-RC1 release notes (#6909)

* Revert "Make shared libraries be able to link to MSVC static runtime libraries, so that VC runtime is not required." (#6914)

* Marked update_compatibility_version.py as executable (#6916)
2019-11-20 18:03:29 -08:00
Rafi Kamal
51475bc4ea
Marked update_compatibility_version.py as executable (#6916) 2019-11-20 16:39:07 -08:00
Rafi Kamal
01425cb262
Revert "Make shared libraries be able to link to MSVC static runtime libraries, so that VC runtime is not required." (#6914)
This reverts commit 129a7c875f. We are
seeing the following error when building Python release artifacts in Windows:
" error LNK2038: mismatch detected for 'RuntimeLibrary': value
'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in
descriptor.obj".
2019-11-20 15:34:09 -08:00
Rafi Kamal
52b632cf27
Update CHANGES.txt with 3.11.0-RC1 release notes (#6909) 2019-11-20 10:45:24 -08:00
Sydney Acksman
f084d622c2 Add test for not throwing on missing required 2019-11-20 11:54:20 -06:00
Sydney Acksman
6f09cc3a0c Fix readability. 2019-11-20 10:56:34 -06:00
Sydney Acksman
3457f88940 Fix formatting 2019-11-20 10:55:48 -06:00
Jan Tattermusch
77d33734cf
simpler fix 2019-11-20 12:48:49 +01:00