Wouter van Oortmerssen [Mon, 13 Jun 2016 20:07:17 +0000 (13:07 -0700)]
Merge pull request #3903 from senior7515/master
Add env var for flatc schema compiler cmake module
Alexander Gallego [Tue, 7 Jun 2016 22:08:09 +0000 (18:08 -0400)]
Add env var for flatc schema compiler cmake module
Wouter van Oortmerssen [Wed, 8 Jun 2016 18:51:49 +0000 (11:51 -0700)]
Merge branch 'master' of https://github.com/google/flatbuffers into fuzzer2
Wouter van Oortmerssen [Tue, 7 Jun 2016 00:38:21 +0000 (17:38 -0700)]
Added a way to get mutable tables out of a mutable vector of tables.
Change-Id: I8f9ef1d14f86671ced929c7a159115b1d8510327
Tested: on Linux.
Wouter van Oortmerssen [Thu, 26 May 2016 00:47:44 +0000 (17:47 -0700)]
Fixed LoadFile crashing on directory arguments.
Change-Id: I737f6fd0bb1302ab7cfa6ab8b06108e221ebb63c
Tested: on Linux.
Wouter van Oortmerssen [Thu, 2 Jun 2016 21:55:35 +0000 (14:55 -0700)]
Fixed compile errors on Windows
Wouter van Oortmerssen [Thu, 2 Jun 2016 18:35:41 +0000 (11:35 -0700)]
Merge pull request #3885 from Lakedaemon/shareWarningAndTwoMethods
Share warning and two methods
Wouter van Oortmerssen [Thu, 2 Jun 2016 18:26:16 +0000 (11:26 -0700)]
Merge pull request #3870 from martinus/master
Added helpers to access objects while creating the flatbuffer.
Wouter van Oortmerssen [Thu, 2 Jun 2016 18:24:48 +0000 (11:24 -0700)]
Merge pull request #3891 from bog-dan-ro/master
More bit fields patches
Martin Ankerl [Wed, 1 Jun 2016 11:13:00 +0000 (13:13 +0200)]
renamed functions
More descriptive name, show that it's really just a temporary object.
BogDan Vatra [Wed, 1 Jun 2016 07:23:44 +0000 (10:23 +0300)]
Don't generate MIN & MAX enum values if "--no-prefix" is used.
Close #3892
BogDan Vatra [Wed, 1 Jun 2016 07:03:40 +0000 (10:03 +0300)]
MIN & MAX are useless for bit_flags
Instead we need NONE (0) and ANY (all orred values), if the user didn't
already defined them
BogDan Vatra [Wed, 1 Jun 2016 07:05:27 +0000 (10:05 +0300)]
Add ! operator
BogDan Vatra [Wed, 1 Jun 2016 07:04:55 +0000 (10:04 +0300)]
We already know the underlying_type.
We just need to pass it to DEFINE_BITMASK_OPERATORS macro
Wouter van Oortmerssen [Tue, 31 May 2016 18:59:51 +0000 (11:59 -0700)]
Merge pull request #3888 from bog-dan-ro/master
Define bit mask operators for scoped enums bitfields
Wouter van Oortmerssen [Tue, 31 May 2016 18:33:10 +0000 (11:33 -0700)]
Merge pull request #3889 from PSPDFKit-labs/james/avoid-msvc-align-error
MSVC doesn't allow alignment on function params.
BogDan Vatra [Mon, 30 May 2016 11:04:37 +0000 (14:04 +0300)]
Define bit mask operators for scoped enums bitfields
Close #3887
lakedaemon [Sat, 28 May 2016 06:15:43 +0000 (08:15 +0200)]
sharing namespace_dir and the namespace string methods
lakedaemon [Thu, 26 May 2016 13:26:58 +0000 (15:26 +0200)]
sharing the Flatbuffers warning
Wouter van Oortmerssen [Sat, 23 Apr 2016 01:29:22 +0000 (18:29 -0700)]
Add simple libfuzzer based test.
This tests the verifier and the parser.
Tested: on Linux.
Bug:
27230459
Change-Id: I3417faba9385dc941199c57a08d8a50c2faec1aa
Wouter van Oortmerssen [Wed, 25 May 2016 17:38:56 +0000 (10:38 -0700)]
Merge pull request #3880 from Lakedaemon/IsEverythingGenerated
shared method that exits early if everything is generated
Lakedaemon [Wed, 25 May 2016 13:15:56 +0000 (15:15 +0200)]
shared method that exits early if everything is generated
James Swift [Tue, 24 May 2016 15:16:03 +0000 (17:16 +0200)]
MSVC doesn't allow alignment on function params. This prevents the copy and thus avoids this issue https://msdn.microsoft.com/en-us/library/373ak2y1.aspx
Wouter van Oortmerssen [Mon, 23 May 2016 23:58:50 +0000 (23:58 +0000)]
Merge "Uncomment the corpus attribute since b/
28762769 is fixed, add more items to the corpus (taken from the ClusterFuzz-generated corpus)." into ub-games-master
Wouter van Oortmerssen [Mon, 23 May 2016 23:58:26 +0000 (23:58 +0000)]
Merge "Add a fuzzer for flatbuffers, derived from the one used in Chromium: https://code.google.com/p/chromium/codesearch#chromium/src/testing/libfuzzer/fuzzers/flatbuffers_verifier_fuzzer.cc" into ub-games-master
Wouter van Oortmerssen [Mon, 23 May 2016 23:51:07 +0000 (16:51 -0700)]
Merge pull request #3865 from bhamiltoncx/surrogate-pairs
Handle \u-escaped surrogate pairs correctly in IDL parser
Stewart Miles [Mon, 23 May 2016 23:49:56 +0000 (23:49 +0000)]
Merge "Removed reference to deprecated NDK toolchain version." into ub-games-master
Ben Gertzfield [Thu, 28 Apr 2016 19:27:38 +0000 (12:27 -0700)]
Handle \u-escaped surrogate pairs correctly in IDL parser
Wouter van Oortmerssen [Mon, 23 May 2016 23:37:57 +0000 (16:37 -0700)]
Uncomment the corpus attribute since b/
28762769 is fixed,
add more items to the corpus (taken from the ClusterFuzz-generated corpus).
(mirrored from cl
122690857)
Change-Id: I98c7672169a9a27fe18bedae8501e6fb85a0681d
Wouter van Oortmerssen [Mon, 23 May 2016 23:35:20 +0000 (16:35 -0700)]
Add a fuzzer for flatbuffers, derived from the one used in Chromium:
https://code.google.com/p/chromium/codesearch#chromium/src/testing/libfuzzer/fuzzers/flatbuffers_verifier_fuzzer.cc
(mirrored from cl
122676317)
Change-Id: I0074af435cf37f5e6368b040563c3733d9e02345
Stewart Miles [Mon, 23 May 2016 23:27:35 +0000 (16:27 -0700)]
Removed reference to deprecated NDK toolchain version.
Change-Id: I8d39a66ca5642427619c60f349fa78917aec2455
Wouter van Oortmerssen [Mon, 23 May 2016 21:56:47 +0000 (14:56 -0700)]
Merge branch 'master' of https://github.com/google/flatbuffers
Wouter van Oortmerssen [Mon, 23 May 2016 21:06:19 +0000 (14:06 -0700)]
Fixed Google Groups link in documentation.
Change-Id: I64307ccd0a6f23a7c3860d602813e637415e7c91
Wouter van Oortmerssen [Mon, 23 May 2016 20:53:08 +0000 (13:53 -0700)]
Made .sh files all have same comment formatting.
Change-Id: Ie7cc268a8823aec1d06c8b7cbef54068d832de3a
Wouter van Oortmerssen [Mon, 23 May 2016 20:55:21 +0000 (13:55 -0700)]
Merge pull request #3878 from pjulien/no_alloc_on_cb
Remove Remaining FBB#createString Allocation
pjulien [Mon, 23 May 2016 20:47:41 +0000 (16:47 -0400)]
Clarify documentation based on review comments
Wouter van Oortmerssen [Mon, 23 May 2016 19:24:44 +0000 (12:24 -0700)]
Removed BOM marker from some files.
Also removed some trailing whitespace.
Change-Id: I40bf4f776ca4d467b7ee6f2c9a7500c13700f9d5
Wouter van Oortmerssen [Mon, 23 May 2016 17:59:47 +0000 (10:59 -0700)]
Merge branch 'master' of https://github.com/google/flatbuffers
Wouter van Oortmerssen [Mon, 23 May 2016 16:51:41 +0000 (09:51 -0700)]
Added missing licenses to some sh/cs/py files.
Bug: https://github.com/google/flatbuffers/issues/3872
Change-Id: I5d551168e9bc925e867e5e4ddf5d809418fd44eb
Tested: on Linux.
pjulien [Sat, 21 May 2016 13:19:43 +0000 (09:19 -0400)]
If the user passes in a {{CharBuffer}} himser, reward him by
eliminating the last remaining allocation in string creation
Wouter van Oortmerssen [Fri, 20 May 2016 20:19:52 +0000 (13:19 -0700)]
Merge pull request #3867 from dreifachstein/master
Use the build output flatc to compile test schemas by default.
Wouter van Oortmerssen [Fri, 20 May 2016 20:10:52 +0000 (13:10 -0700)]
Merge pull request #3866 from bhamiltoncx/fix-undefined-bit-shift
Fix undefined behavior when CheckBitsFit left-shifts 64-bit value by 64 bits
Wouter van Oortmerssen [Thu, 19 May 2016 01:01:17 +0000 (18:01 -0700)]
Merge branch 'master' of https://github.com/google/flatbuffers
Wouter van Oortmerssen [Thu, 19 May 2016 01:00:25 +0000 (18:00 -0700)]
Fixes verifier not catching odd vtable sizes.
Bug:
28762769
Change-Id: Iec370482f67c4585e97dd5175c1a4258ddba47fe
Tested: on Linux.
Wouter van Oortmerssen [Wed, 18 May 2016 17:33:55 +0000 (10:33 -0700)]
Merge pull request #3877 from ozkuran/patch-1
Fixed Library Location in CppUsage.md
Mahmut Ali ÖZKURAN [Wed, 18 May 2016 09:02:32 +0000 (12:02 +0300)]
Fixed Library Location in CppUsage.md
Fixed Library Location
"https://github.com/google/flatbuffers/tree/master/include/flatbuffers"
in CppUsage.md
Martin Ankerl [Tue, 3 May 2016 15:20:14 +0000 (17:20 +0200)]
Added helpers to access objects while creating the flatbuffer.
GetObject and GetMutableObject are similar to GetRoot and GetMutableRoot,
and can be useful when wanting to access data that has just been created.
Unfortunately there is a danger in using these methods, as it is possible
that the buffer reallocates which will invalidate the pointers.
Xiaolei Yu [Sun, 1 May 2016 03:15:53 +0000 (11:15 +0800)]
Use the build output flatc to compile test schemas by default.
Ben Gertzfield [Fri, 29 Apr 2016 19:57:48 +0000 (12:57 -0700)]
Fix undefined behavior in CheckBitsFit bit-shift on size_t
Robert [Thu, 28 Apr 2016 03:31:55 +0000 (20:31 -0700)]
Merge pull request #3806 from mediagraph/fix-create-string
Fix CreateString with already-encoded string or bytearray in Python 2.7.
Wouter van Oortmerssen [Thu, 28 Apr 2016 01:12:15 +0000 (18:12 -0700)]
Merge pull request #3854 from pjulien/3853
Fix for #3853
Wouter van Oortmerssen [Wed, 27 Apr 2016 20:59:16 +0000 (13:59 -0700)]
Merge pull request #3843 from Lakedaemon/refactoring
Transition 1 (nice diffs) Go, C++ and General generators with class
Wouter van Oortmerssen [Wed, 27 Apr 2016 20:50:04 +0000 (13:50 -0700)]
Merge pull request #3863 from pjulien/cseq
Can now use ``CharSequence`` of ``String``. Works with
Lakedaemon [Tue, 26 Apr 2016 15:08:13 +0000 (17:08 +0200)]
memory leak fix + php/js/python transition to class based generator
pjulien [Tue, 26 Apr 2016 02:07:57 +0000 (22:07 -0400)]
Can now use ``CharSequence`` of ``String``. Works with
1. [AsciiString]
(http://netty.io/4.1/api/io/netty/util/AsciiString.html)
2. [CharBuffer]
(https://docs.oracle.com/javase/8/docs/api/java/nio/CharBuffer.html)
3. [StringBuilder]
(https://docs.oracle.com/javase/8/docs/api/java/lang/StringBuilder.html)
Robert [Sun, 24 Apr 2016 01:38:03 +0000 (18:38 -0700)]
Merge pull request #3859 from rw/go-zero-alloc-strings
Go: Fix heap allocation when reading a string.
rw [Sat, 23 Apr 2016 19:31:24 +0000 (12:31 -0700)]
Fix heap allocation when reading a string.
Wouter van Oortmerssen [Fri, 22 Apr 2016 18:42:14 +0000 (11:42 -0700)]
Merge pull request #3850 from pjulien/3849
Fix for #3849
Wouter van Oortmerssen [Fri, 22 Apr 2016 18:35:10 +0000 (11:35 -0700)]
Merge branch 'master' of https://github.com/google/flatbuffers
Wouter van Oortmerssen [Fri, 22 Apr 2016 18:31:35 +0000 (11:31 -0700)]
Fixed a verifier check that didn't return from its parent.
Change-Id: I1aef5fdba72de0c3bb8276c9f50fffa494f26e29
Tested: on Linux.
Wouter van Oortmerssen [Fri, 22 Apr 2016 18:26:47 +0000 (11:26 -0700)]
Fixed SkipByteOrderMark advancing cursor_ too early.
Change-Id: Ie60f01d935ca6b4aa6ce0eab7598602ac0758342
Tested: on Linux.
pjulien [Sun, 17 Apr 2016 00:49:36 +0000 (20:49 -0400)]
Fix for #3849
This avoids the following allocations over repeated use:
- A ``CharsetEncoder``
- A byte array to contain the contents of the string
- A wrapper, via ``ByteBuffer#wrap``, for the previously mentioned byte
array
This also removes a copy of the temporary byte array. This extra copy
is needed because ``String#getBytes`` returns a byte array and its
length must match the exact size of the contents.
This implementation requires that the builder retain a ``ByteBuffer``
and ``CharEncoder``. This is considered slower only for users that
will only allocate a single string in their buffers or none at all.
The improvement is especially potent if the builder is constantly reused
by its caller. This also eliminates the penalty for users that do not
use strings at all since the cost of allocating these fields is
now amortized.
The only allocation left in this code is a ``CharBuffer`` wrapper. It's
possible to eliminate this allocation using an additional copy but need
further profiling to see which is the bigger problem.
Wouter van Oortmerssen [Wed, 20 Apr 2016 19:05:21 +0000 (12:05 -0700)]
Fixed float suffix not being added on implicit float defaults.
Change-Id: I8dcbb5e93836356511d411ef86452babd3dd3c0b
Tested: on Linux.
pjulien [Tue, 19 Apr 2016 01:43:28 +0000 (21:43 -0400)]
size the allocation to the required bytes
pjulien [Tue, 19 Apr 2016 00:19:56 +0000 (20:19 -0400)]
fix file permission
pjulien [Tue, 19 Apr 2016 00:02:27 +0000 (20:02 -0400)]
Fix for #3853
Removes the following allocations:
- ``CharsetDecoder`` is reused between calls
- ``CharBuffer#wrap`` removed in favor of heap
based char buffer that is reused
- Temporary ``char[]``, an intermediate copy inside ``StringCoding``
- Another ``char[]``, this is needed because ``StringCoding`` uses
a ``CharBuffer`` internally but returns a ``char[]``. Extra
characters need to be trimmed so this means yet another allocation
- Yet another ``char[]`` directly from ``__string`` for non-heap
based buffers
Removes the following copies
- No copy is performed to trim the allocation since a ``CharBuffer``
is used directly
- For non-heap based byte buffers, removes the copy that was
previously done in the __string function
This does need to get the TLS entry which implies at least some
contention on the thread object table and a fence.
Wouter van Oortmerssen [Mon, 18 Apr 2016 22:54:34 +0000 (15:54 -0700)]
Merge pull request #3848 from pjulien/3847
Fix for 3847
Wouter van Oortmerssen [Mon, 18 Apr 2016 18:48:53 +0000 (11:48 -0700)]
Fixed whole-number float default values missing a .0 suffix.
A previous commit that added "f" for C++/Java/C# would break
on gcc of constants like 3f, which are now output as 3.0f
Tested: on Linux
Change-Id: If9cabbe3c6d6948a5050b8b123bda9c06e181f52
pjulien [Sun, 17 Apr 2016 00:09:28 +0000 (20:09 -0400)]
3847
Lakedaemon [Fri, 15 Apr 2016 11:20:26 +0000 (13:20 +0200)]
Enforcing the google C++ style guide
Wouter van Oortmerssen [Thu, 14 Apr 2016 00:44:23 +0000 (17:44 -0700)]
Merge branch 'master' of https://github.com/google/flatbuffers
Wouter van Oortmerssen [Thu, 14 Apr 2016 00:29:03 +0000 (17:29 -0700)]
Fixed missing "f" on float default values in C++/Java/C#
Bug:
28145201
Change-Id: I5a1818c40c2f4fbd00cfec3362040407976f7a39
Tested: on Linux.
Wouter van Oortmerssen [Wed, 13 Apr 2016 23:14:11 +0000 (16:14 -0700)]
Merge pull request #3844 from Nnamdi/CreateUninitializedVector_fix
Stop CreateUninitializedVector returning a pointer to invalid memory.
Nnamdi [Wed, 13 Apr 2016 22:04:27 +0000 (23:04 +0100)]
Stop CreateUninitializedVector returning a pointer to invalid memory.
CreateUninitializedVector was performing the following actions:
1. call StartVector.
2. call make_space, and set buf to point to the reserved space.
3. call EndVector.
The problem is that a call to EndVector can ultimately call make_space, which
if the buffer is full, will cause a reallocation, invalidating the value stored
in buf. So setting buf needs to be delayed until after EndVector.
The following code, when run under valgrind shows a write to free'd memory before
the change, but no such error after:
int main()
{
flatbuffers::FlatBufferBuilder fbb(128);
char *buf = nullptr;
fbb.CreateUninitializedVector(128, &buf);
*buf = 0;
}
Lakedaemon [Wed, 13 Apr 2016 21:21:18 +0000 (23:21 +0200)]
Transition 1 (with nice diffs) Go, Cpp and General code generators with class
Wouter van Oortmerssen [Wed, 13 Apr 2016 19:02:22 +0000 (12:02 -0700)]
Fixed struct -> class pre-declaration error.
Change-Id: I3730a6823d603982c4250d514e827e3f93d1f81e
Tested: on Linux.
Wouter van Oortmerssen [Tue, 12 Apr 2016 00:36:56 +0000 (17:36 -0700)]
Made user-defined attributes available in the reflection data.
Tested: on Linux.
Bug:
27923233
Change-Id: Ic16675650e4a8e138c163f1e2131a3aad7008ada
Wouter van Oortmerssen [Mon, 11 Apr 2016 20:48:57 +0000 (13:48 -0700)]
Merge branch 'master' of https://github.com/google/flatbuffers
Wouter van Oortmerssen [Mon, 11 Apr 2016 18:08:09 +0000 (11:08 -0700)]
Fixed JSON integers as strings not being parsed correctly.
Change-Id: If34aef46ef619e06de799cff14948b02e98da86d
Tested: on Linux.
Wouter van Oortmerssen [Mon, 11 Apr 2016 18:05:42 +0000 (11:05 -0700)]
Fixed pre-declarations of included types in generated code.
This was harmless, but unnecessary.
Change-Id: I1365a725e254d4ebbda081110a50277cb5118323
Tested: on Linux.
Wouter van Oortmerssen [Fri, 8 Apr 2016 18:32:16 +0000 (11:32 -0700)]
Merge pull request #3789 from Chippiewill/master
Allow builds on platforms with unsigned chars by default
Wouter van Oortmerssen [Fri, 8 Apr 2016 18:18:58 +0000 (11:18 -0700)]
Merge pull request #3839 from klapek/net/bytebuffer-assert-optimization
Remove unnecessary condition in AssertOffsetAndLength.
Wojciech Jaszczak [Fri, 8 Apr 2016 17:56:02 +0000 (19:56 +0200)]
Remove unnecessary condition in AssertOffsetAndLength.
Condition is already checked and covered in the following condition, the second one was excess.
Signed-off-by: Wojciech Jaszczak <jaszczakw@gmail.com>
Wouter van Oortmerssen [Fri, 8 Apr 2016 17:54:27 +0000 (10:54 -0700)]
Merge pull request #3832 from mikkelfj/c_docs
Documentation for C bindings
Mikkel Fahnøe Jørgensen [Thu, 7 Apr 2016 16:52:00 +0000 (18:52 +0200)]
Update C documentation with supported MSVC versions, and other minor updates.
Wouter van Oortmerssen [Tue, 5 Apr 2016 00:01:21 +0000 (17:01 -0700)]
Added missing util.cpp to VS project
Wouter van Oortmerssen [Tue, 5 Apr 2016 00:07:05 +0000 (17:07 -0700)]
Adding missing util.cpp to Xcode project
Wouter van Oortmerssen [Mon, 4 Apr 2016 23:55:25 +0000 (16:55 -0700)]
Merge branch 'master' of https://github.com/google/flatbuffers
Wouter van Oortmerssen [Mon, 4 Apr 2016 22:38:32 +0000 (15:38 -0700)]
Merge pull request #3836 from tkelman/cygwinbuild
Fix build on Cygwin
Wouter van Oortmerssen [Thu, 31 Mar 2016 00:34:52 +0000 (17:34 -0700)]
add setloadfile and setfileexists functions to flatbuffers
to allow for custom file loaders. The targeted use case is android runtime.
(from CL
116980408)
Change-Id: I8785c0acf714fab41d8f6fc9f1c52875423b8f5b
Wouter van Oortmerssen [Thu, 31 Mar 2016 00:26:44 +0000 (17:26 -0700)]
Fix flatbuffers conversion warnings.
(from CL
116785833)
Change-Id: I0fb0e1318fd70cba51e229a93f535c6639bbb331
Wouter van Oortmerssen [Thu, 31 Mar 2016 00:21:48 +0000 (17:21 -0700)]
Fix flatc build for msvc.
(from CL
117010760)
Change-Id: I0ee77cf87d0cb00b94887356745b85423b1375a6
Wouter van Oortmerssen [Thu, 31 Mar 2016 00:00:49 +0000 (17:00 -0700)]
Fixed potential integer overflow in the Verifier.
This overflow could allow malformed FlatBuffers to pass the verifier.
Change-Id: Ia993299a761b00b93e53e8aff2689b631755763c
Tested: on Linux.
Bug:
27903580
Wouter van Oortmerssen [Mon, 4 Apr 2016 20:00:48 +0000 (13:00 -0700)]
Fixed VS assignment constructor warning.
Mikkel Fahnøe Jørgensen [Mon, 4 Apr 2016 14:33:20 +0000 (16:33 +0200)]
Remove details on FlatCC builds that would easily become outdated
Mikkel Fahnøe Jørgensen [Sun, 3 Apr 2016 19:37:57 +0000 (21:37 +0200)]
Document FlatCC support for Windows
Tony Kelman [Sat, 2 Apr 2016 04:42:23 +0000 (21:42 -0700)]
Fix build on Cygwin
use -std=gnu++11 instead of c++0x on cygwin to avoid
error: realpath was not declared in this scope
ref http://www.cygwin.com/ml/cygwin/2016-03/msg00005.html
Wouter van Oortmerssen [Wed, 30 Mar 2016 21:04:36 +0000 (14:04 -0700)]
Merge pull request #3816 from armen/master
Implement __vector_as_bytes and methods to get [ubyte] efficiently
Wouter van Oortmerssen [Wed, 30 Mar 2016 20:14:49 +0000 (13:14 -0700)]
Merge pull request #3834 from Nnamdi/gen_name_strings
Added --gen-name-strings command line option.
Nnamdi [Tue, 29 Mar 2016 21:25:04 +0000 (22:25 +0100)]
Added --gen-name-strings command line option.
To support the use case described in issue google/flatbuffers#3826, a new command line option --gen-name-strings
has been added, which will cause a static GetFullyQualifiedName function to be added
to the C++ output for tables/structs.