aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2019-10-08Check post_processors_.empty() in CrossOverVitaly Buka
2019-10-08Add global mutator supportPeter Foley
I have a use-case where multiple top-level proto message embed the same submessage type. I would like to be able to create a single mutator for the message type instead of having to duplicate the logic everywhere.
2019-09-06Update googletest and protobufVitaly Buka
googletest 3f05f651ae3621db58468153e32016bc1397800b protobuf 1363bf9c051af36c555c23d734a204246c215697
2019-09-06Don't "post process" and InitializeAndTrim from recursive Mutate callsVitaly Buka
2019-09-06run clang-formatPeter Foley
2019-09-06Replace Custom mutations with mutation post processingVitaly Buka
2019-08-31Remove static members from MutatorVitaly Buka
2019-08-31Use Mutator as singletonVitaly Buka
2019-08-31Move random number generator inside of Mutator.Vitaly Buka
2019-07-29Remove trailing spacesVitaly Buka
2019-07-29Update protobufVitaly Buka
2019-07-29Move no_mutator_test.ccVitaly Buka
2019-07-29Initialize fields of map entriesVitaly Buka
2019-07-29Convert more tests into TYPED_TESTVitaly Buka
2019-07-29Fix no_mutator_test build for "check"Vitaly Buka
2019-06-10Renames SANITIZER_INTERFACE_WEAK_DEF to LIB_PROTO_MUTATOR_WEAK_DEFToshi Piazza
2019-06-10Introduced SANITIZER_INTERFACE_WEAK_DEFToshi Piazza
Taken from compiler-rt/lib/sanitizer-common/sanitizer_internal_defs.h but with functionality reduced.
2019-06-10Builds tests with MSVCToshi Piazza
Adds support for building cmake tests with MSVC Fixes some compile errors in test code on MSVC Adds back __attribute__((weak)) to declaration of LLVMFuzzerMutate() for clang and adds alternatename pragma to declaration for MSVC Adds a functional test for linking protobuf-mutator and protobuf-mutator-libfuzzer but *not* libfuzzer into a target
2019-06-10Updates CMakeLists.txt to build for MSVCToshi Piazza
Fixes some issues with compiler flags not supported at MSVC (-Werror) Also, Protobuf builds by default with /MT, whereas LPM built by default with /MD. Now, when -DLIB_PROTO_MUTATOR_DOWNLOAD_PROTOBUF=On or -DLIB_PROTO_MUTATOR_MSVC_STATIC_RUNTIME=On are specified we build LPM with /MT so they can properly link together.
2019-04-17Fix compile error/warning in src/field_instance.h (was comparison with ↵spq
unsigned < 0, which is always false) The error previously was: [12/16] Building CXX object src/CMakeFiles/protobuf-mutator.dir/mutator.cc.oIn file included from /fuzzing/libprotobuf-mutator/src/mutator.cc:23:/fuzzing/libprotobuf-mutator/src/field_instance.h:149:22: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]    if (value->index < 0 || value->index >= value->count) GetDefault(value);        ~~~~~~~~~~~~ ^ ~1 warning generated.
2019-02-04Remove workaround for stack overflowVitaly Buka
Not needed with protocolbuffers/protobuf#5661
2019-01-31Add check to avoid stack overflow parsing nested messagesVitaly Buka
2019-01-31replace std::mt19937 with a much faster std::minstd_randKostya Serebryany
2019-01-31Speedup unit testsVitaly Buka
Reduce mutations space by using default values more frequently in tests. Some tests run 100x times faster now.
2019-01-23Fix index checkVitaly Buka
2019-01-23Switch from TEST_CASE_P to TEST_SUITE_PVitaly Buka
2019-01-23Never copy unknown enum valuesVitaly Buka
Right now test format does not support parsing them. When this fixed https://github.com/protocolbuffers/protobuf/pull/5622 we can consider to support unknown values.
2019-01-23Check that all tests strings parsedVitaly Buka
2019-01-23Add FieldInstance::DebugStringVitaly Buka
2019-01-23Move EnforceUtf8 check into CanCopyAndDifferentFieldVitaly Buka
2019-01-23Rename IsEqualValueField to CanCopyAndDifferentFieldVitaly Buka
2018-11-08cmake: Set SOVERSION property for shared librariesMichal Rostecki
Set SOVERSION for shared libraries to have both .so and .so.0 files.
2018-11-08cmake: Define LIBRARY DESTINATION for install targetsMichal Rostecki
To be able to install shared libraries, `LIBRARY DESTINATION` option needs to be defined in `install` command.
2018-10-31Re-enabled unitests disabled by #94Vitaly Buka
Fixes #101
2018-09-27Add flag for tests building (#94)Kitsu
* Add flag for tests building Signed-off-by: Kitsu <mail@kitsu.me> * Undo system gtest find Signed-off-by: Kitsu <mail@kitsu.me> * Add consistent prefix to TESTING
2018-09-26change int32_t to uint32_tJonathan Metzman
2018-09-26remove whitespace changeJonathan Metzman
2018-09-26[NFC] Change types for in uniform_int_distribution for WindowsJonathan Metzman
On Windows std::uniform_int_distribution does not accept uint8_t or char32_t. Using them causes compilation failure. In places where they are used, substitute uint16_t and char32_t, respectively.
2018-09-26Added "make install" and pkg-config file.Allen Webb
2018-09-07Added per field mutator hooks. (#98)Allen-Webb
2018-05-30Add include statement to fix buildEmmett Neyman
2018-01-15Fix -Werror=sign-compareVitaly Buka
2017-09-28Improve protection against stack overflowVitaly Buka
Even messages without required fields can be deep enough to trigger stack overflow.
2017-09-13Fix compile error in Chromium by changing error message in assertionJonathan Metzman
Change assertion so it doesn't cause a compilation error with -Wstring-conversion, add "-Wstring-conversion" to CMakeLists.txt so this will be caught here if it happens again.
2017-08-22Increase kMaxInitializeDepth and remove annoying assertVitaly Buka
2017-08-15Fix compilation with GCC 7Tomáš Popela
The build with GCC 7 fails with: FAILED: obj/third_party/libprotobuf-mutator/libprotobuf-mutator/mutator.o g++ -MMD -MF obj/third_party/libprotobuf-mutator/libprotobuf-mutator/mutator.o.d -DV8_DEPRECATION_WARNINGS -DUSE_UDEV -DUSE_AURA=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DFIELDTRIAL_TESTING_ENABLED -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DHAVE_PTHREAD -I../.. -Igen -I../../third_party/libprotobuf-mutator/src -I../../third_party/protobuf/src -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-tables -fPIC -pipe -pthread -m64 -march=x86-64 -Wall -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-missing-field-initializers -Wno-unused-parameter -O2 -fno-ident -fdata-sections -ffunction-sections -fomit-frame-pointer -g0 -fvisibility=hidden -std=gnu++14 -Wno-narrowing -fno-rtti -fno-exceptions -fvisibility-inlines-hidden -c ../../third_party/libprotobuf-mutator/src/src/mutator.cc -o obj/third_party/libprotobuf-mutator/libprotobuf-mutator/mutator.o ../../third_party/libprotobuf-mutator/src/src/mutator.cc:35:12: error: ‘std::placeholders’ has not been declared using std::placeholders::_1; ^~~~~~~~~~~~ ../../third_party/libprotobuf-mutator/src/src/mutator.cc: In member function ‘void protobuf_mutator::FieldMutator::Mutate(int32_t*) const’: ../../third_party/libprotobuf-mutator/src/src/mutator.cc:342:30: error: ‘bind’ is not a member of ‘std’ RepeatMutate(value, std::bind(&Mutator::MutateInt32, mutator_, _1)); ^~~~ ../../third_party/libprotobuf-mutator/src/src/mutator.cc:342:30: note: suggested alternative: ‘find’ RepeatMutate(value, std::bind(&Mutator::MutateInt32, mutator_, _1)); ^~~~ find ... truncated for simplicity. Including functional fixes the build.
2017-08-02Use system-installed protobuf by default.Matt Morehouse
Alternatively, setting DOWNLOAD_PROTOBUF=1 in cmake will have a working protobuf version downloaded and built automatically.
2017-06-13Reset message if parsing failed.Vitaly Buka
2017-06-09Restrict proto3 strings to valid UTF-8Vitaly Buka
Fixes #43
2017-06-09Add FieldInstance::EnforceUtf8Vitaly Buka