Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
This commit fixes handling of default and NULL `key` fields in `Parser::ParseVector` (#5928).
The JSON generator updated. It outputs `key` fields even if the `--force-defaults` option is inactive.
Additional test cases for `key` added.
|
|
|
|
* Implements type promotion for Java enum as suggested in #3890, #5111, #6369
* After generate_code.sh
|
|
Removing this workflow as it isn't used.
|
|
It errors with "Fatal error: Uncaught exception 'InvalidArgumentException' with message 'bad number for type byte.. in /home/runner/work/flatbuffers/flatbuffers/php/ByteBuffer.php:490" which I can't reproduce locally, and trying to fix it on CI runs into PHP's insane handling of numbers vs strings.
|
|
* semver-compatible deprecations
* removed unneeded lifetimes (+ clippy warnings)
* silenced too many args warning
|
|
|
|
* [idl_parser] Improve stack overflow protection
Add stack overflow protection for Flexbuffer and nested Flatbuffer parsers.
Replaces the `Recurse()` method by the new ParseDepthGuard RAII class.
* Remove move operator from Parser.
It was wrong decision to add move ctor and assignment into Parser class.
These operators will make it extremely difficult to add constant or reference fields in the future.
* Remove ';' from definition of FLATBUFFERS_DELETE_FUNC
* Format code
* Make this PR compatible with MSVC2010 (it doesn't support inherited ctor)
|
|
* [idl_parser] Check the range of explicitly set field's id value
The explicitly set `id` attribute should be a non-negative value of the `voffset_t` type.
* Format FieldIdentifierTest()
|
|
* Generate code to encode and decode nested flatbuffers in Python.
* Delete accidental trailing whitespace.
* Fully delete trailing whitespace.
|
|
* Adds shared strings and tests for shared strings
* Adds resets on string_map
* Moved shared strings to use vector instead of hashmap
* Addresses all the issues
* Resolves some comments
|
|
|
|
* include_prefix support for rust
* include_prefix support for java
* formatting fixes
* Revert "include_prefix support for java"
* style fix
|
|
* Rebuild the way swift handles structs from scratch
* Updates docs, and sample binary
* Replaces InMemory to Mutable
* Migrates docs from inmemory
* use inline for some functions
* Renamed Mutable objects
* Updates documentation
|
|
* Fix typos in usage/comments; Make rust generator respect to --filename-suffix
* run clang format
|
|
The infinityf symbol is causing a conflict when building for cygwin. In
the cygwin math.h header there is also a symbol called infinityf. So
this patch is needed to be able to build the flatbuffer tests in a
cygwin environment.
|
|
* Add vectorNumElements attribute to Builder for simpler vector creation.
This adds a default to EndVector which should simplify its use.
* Update tutorial to reflect new default arg in Python EndVector.
* Remove optional argument to Python EndVector.
* Add generated files.
* Unset Builder.vectorNumElems when not in use.
|
|
* Adds formatters CI
Adds Error message & setup formatting like cpp
Adds Swift
Adds typescript
Adds python
tests yarn
Adds format.md
* Removes unneeded scripts + moves install script to install phase
* Adds format.md content
* Adds cpp to the formatter.md and fixes ci
* Adds cpp to formatter ci
|
|
apparently the default xcodebuild path of ./build clashes with the BUILD file present (case insensitive file system?)
|
|
(without -gen-mutable) (#6273)
* Added missing EndTable() call to VerifyObject()
VerifyObject called VerifyTableStart() but not EndTable(). This made Verifier::VerifyComplexity() increase depth_ with each table, not with the depth of tables.
https://groups.google.com/forum/#!topic/flatbuffers/OpxtW5UFAdg
* Added Check to VerifyAlignment
https://stackoverflow.com/questions/59376308/flatbuffers-verifier-returns-false-without-any-assertion-flatbuffers-debug-veri
* Add GetStringView (Convenience function to get string_view from a String returning an empty string_view on null pointer) like GetString, GetCstring
* flatc should warn, when an attribute is attached more than once.
flatc.exe -b duplicate.fbs
warning: duplicate.fbs(5, 36): warning: attribute already found: priority
duplicate.fbs:
namespace MyGame;
attribute "priority";
table Monster (priority:1, priority:2) {
}
root_type Monster;
* flatc should support --binary --schema with optional scalar fields.
This fixes 'error: Optional scalars are not yet supported in at least one the of the specified programming languages.' when calling flatc.exe --binary --schema with a schema containing optional scalars.
* Generate nullable properties in C# object-based API for optional scalars.
tests\generate_code.bat extended to test this.
Ran tests\generate_code.bat
Ran tests\Flatbuffers.Test\NetTest.bat
* %TEST_BASE_FLAGS% replaced with --gen-object-api in generate_code.bat, because only this is part of this PR. Added this same flag to generate_code.sh
* generate_code.bat and generate_code.sh changed to only test c# with object based api.
|
|
|
|
|
|
* Fix C/C++ Create<Type>Direct with sorted vectors
If a struct has a key the vector has to be sorted. To sort the vector
you can't use "const".
* Changes due to code review
* Improve code readability
* Add generate of JSON schema to string to lib
* option indent_step is supported
* Remove unused variables
* Fix break in test
* Fix style to be consistent with rest of the code
* Add option --no-warnings to inhibit all warnings
* Fix order of member initialization
* Add documentation for --no-warnings
|
|
This commit makes the names of fuzzing dictionaries the same as the target binary names.
Also it explicitly limits size of test inputs to prevent failures in `regex` and fuzzing time-outs.
|
|
Co-authored-by: Casper Neo <cneo@google.com>
|
|
* Set default initialSize for Builder to 0
* Change default size of builder to 1024.
This matches what the C++ and Java versions do.
|
|
* Updated comments and fixed a fundemental type error.
* bump rust flatbuffers semver
* Initial commit with verifier, need to clean up
* Verifier tested. Needs clean up and refactoring.
* Display for InvalidFlatbuffer and better errors for strings
* SimpleToVerify, some refactoring
* Combined VerifierType TableAccessorFuncBody into FollowType
* scrub todos
* Update Rust get_root functions.
There are 6 variants, with verifier options, default verifier options
and no verification "fast".
* Rename root fns
* inline
* Update to use thiserror
* fix for bad compiler
* improve error formatting
* Replace multiply with saturating_multiply
* saturating adds too
* Add docs disclaiming experimental verification system
Co-authored-by: Casper Neo <cneo@google.com>
|
|
|
|
It is useful to be able to call CreateSharedString with a string_view.
A string_view can be implicitly converted from a std::string or a const
char*. This means if string_view is available, we can use it instead of
both other functions and get all 3.
|
|
The flatbuffers::Parser::Parse() isn't an idempotent method for schema parsing.
This commit removes a wrong for-loop that tried to check the same schema twice.
|
|
|
|
This is fix for (https://oss-fuzz.com/testcase-detail/6251772204810240)
|
|
Prior to this commit the default C++ code generator was `c++0x`.
A code generated with `c++0x` code-gen might have a vulnerability (undefined behavior) connected evolution of enums in a schema. This UB could break the backward compatibility if previously generated code casts an unknown enumerator to enum type that knows nothing about future enumerators added to the schema.
The main differences between `c++0x` and `c++11`:
- generated enums use explicitly declared underlying type;
- generated object-API tables don't declare default ctor() explicitly, instead of it default data member initializers are generated.
Please use `flatc --cpp-std c++0x` option for backward compatibility with old compilers.
|
|
This commit unifies parsing of NaN values read
from .fbs and .json files by converting them to unsigned NaN.
|
|
|
|
* Documentation updates for Optional Scalars
* Updated Support
* Reword stuff
* s/NULL/null
Co-authored-by: Casper Neo <cneo@google.com>
|
|
- add a new method ParseJson to minimize failures during fuzzing
- add default (conditional) move-constructor for Parser
- add a new monster_fuzzer
- switch fuzzers to C++17 and `test/cpp17` generated code
|
|
|
|
|
|
* Add --require-explicit-ids to require explicit ids
We just got bit by a well intentioned developer forgetting that field
order by default is the field index. 3 people missed it in review.
I'm looking at ways to make it harder to mess up. We are requesting
that developers explicitly id all fields in tables. Automatic (opt in
for others) enforcement of this will help the effort succeed. This
patch adds a command line flag which lets the user require ids on all
fields in tables.
* Added docs to Compiler.md as well
|
|
* idl_gen_json_schema.cpp: Changed generation of array element types
#6175
* idl_gen_json_schema.cpp: Simplified indent generation as suggested by @vglavnyy
#6175
|
|
|
|
|
|
The lack of any type on the `ret` variable was causing our typescript compiler to complain.
|
|
* Formats files & adds licence
* Revert arrays
* Keeps array indentation as is
* Adds licence to code formatter
* Updates code generators
|
|
|
|
|
|
Co-authored-by: Casper Neo <cneo@google.com>
|