Giter Site home page Giter Site logo

deepstate-c-blosc2's Introduction

The test harness + Makefile will allow you to test CBlosc-2 and the original CBlosc using

  • DeepState's built-in brute force fuzzer
  • AFL
  • libFuzzer
  • Eclipser (seems Eclipser/QEMU causes some spurious fails that don't reproduce, but still generates interesting tests)

It also can make use of swarm testing.

The Makefile expects that:

  • you installed everything in install under the cblosc[2] dir
  • for AFL, you built c-blosc2 using CC=afl-clang CXX=afl-clang++ cmake -DCMAKE_INSTALL_PREFIX=../install ..
  • for libFuzzer, you built c-blosc2 using CC=clang CXX=clang++ CFLAGS=-fsanitize=fuzzer-no-link CXXFLAGS=-fsanitize=fuzzer-no-link cmake -DCMAKE_INSTALL_PREFIX=../install ..

and copied the resulting library .a files to appropriately named files (see the Makefile). Running source getbloscs.sh should, in the DeepState docker environment, do all these things for you. This will take a while, due to compilation of some compressors being very slow with sanitizers.

Tests are binary compatible (in fact use the same harness, with very small code changes) between the c-blosc versions, which means original c-blosc tests read some pointless bytes to set delta.

You can get started fuzzing with just a few commands:

$ git clone https://github.com/trailofbits/deepstate.git
$ cd deepstate
$ docker build -t deepstate . -f docker/Dockerfile
$ docker run -it deepstate bash

In the docker do:

$ git clone https://github.com/agroce/deepstate-c-blosc2.git
$ cd deepstate-c-blosc2
$ source getbloscs.sh
$ make
$ ./testcblosc2 --fuzz --timeout 100

The pre-computed tests can be run like this:

$ ./testcblosc2 --input_test_files_dir reduced_LF_novalue_corpus_testcblosc2 --no_fork

See https://github.com/trailofbits/deepstate for more on DeepState.

deepstate-c-blosc2's People

Contributors

agroce avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

akhikolla

deepstate-c-blosc2's Issues

Compiling Cblosc2 without libblosc2_AFL.a

For compiling cblosc2 using AFL we use the following command.

testcblosc2_AFL: TestCBloscs.cpp
afl-clang++ -o testcblosc2_AFL TestCBloscs.cpp -I$(CBLOSC2)/include $(CBLOSC2)/lib/libblosc2_AFL.a -ldeepstate_AFL -lpthread

libblosc2_AFL.a is getting generated from running source getbloscs.sh

I am trying to integrate Deepstate with Rcpp, for compiling the test harness in Rcpp package how can I get this file? or how can I compile my test harness in Rcpp file without using libblosc2_AFL.a.
What is the real purpose of this file what does it do while compiling the code?
If it is to specify/load the fuzzer, We can specify the fuzzer while running the code as well right?
Like deepstate-angr ./filename or deepstate-eclipser ./filename
My test harness is a seperate file RcppTestharness.cpp
Any idea on how can I compile it with RcppTestharness.cpp?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.