Age | Commit message (Collapse) | Author |
|
|
|
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.
|
|
googletest 3f05f651ae3621db58468153e32016bc1397800b
protobuf 1363bf9c051af36c555c23d734a204246c215697
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Taken from compiler-rt/lib/sanitizer-common/sanitizer_internal_defs.h but
with functionality reduced.
|
|
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
|
|
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.
|
|
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.
|
|
Not needed with protocolbuffers/protobuf#5661
|
|
|
|
|
|
Reduce mutations space by using default values more frequently in tests.
Some tests run 100x times faster now.
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
Set SOVERSION for shared libraries to have both .so and .so.0
files.
|
|
To be able to install shared libraries, `LIBRARY DESTINATION`
option needs to be defined in `install` command.
|
|
Fixes #101
|
|
* 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
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
Even messages without required fields can be deep enough to trigger stack
overflow.
|
|
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.
|
|
|
|
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.
|
|
Alternatively, setting DOWNLOAD_PROTOBUF=1 in cmake will have a
working protobuf version downloaded and built automatically.
|
|
|
|
Fixes #43
|
|
|