For some reason, this fuzzer failed to load the binary schema file
when run on the `/clusterfuzz` server.
Issue: https://oss-fuzz.com/testcase-detail/6215075358703616
This issue doesn't reproduce locally with the latest oss-fuzz docker image.
* [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)
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.
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.
- 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
* Parser reject "nan(n)" string as it does with nan(n)
* Adjust scalar fuzzer to ignore '$schema' substrings
- Scalar fuzzer ignores '$schema' substrings at the input
- Added 'scalar_debug' target to simplify research of fuzzed cases
* Improve formatting of './tests/fuzzer/CMakeLists.txt'
Having a static_assert on MSAN and ASAN prevents
the fuzzers from being used with different engines,
like TSAN, UBSAN, … but also with fuzzers that aren't
using MSAN/ASAN like afl for example.
* Make the Parser independent from the global C-locale
* Set a specific test locale using the environment variable FLATBUFFERS_TEST_LOCALE
* Remove redundant static qualifiers
add more items to the corpus (taken from the ClusterFuzz-generated corpus).
(mirrored from cl 122690857)
Change-Id: I98c7672169a9a27fe18bedae8501e6fb85a0681d