Skip to content

Commit

Permalink
clean up and set license (BSD 2-clause simplified, same as fmt)
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldreik committed Apr 27, 2019
1 parent e64c3fb commit e2301f2
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 17 deletions.
19 changes: 2 additions & 17 deletions fuzzing/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
# for fuzzing libfmt http://fmtlib.net/
#
# by Paul Dreik 20190420
# https://www.pauldreik.se/


#cmake_minimum_required(VERSION 3.10)

#project(fmt_fuzzers LANGUAGES CXX)

#add_definitions(-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION=1)

#add_subdirectory(fmt)

# Copyright (c) 2019, Paul Dreik
# License: see LICENSE.rst in the fmt root directory

# settings this links in a main. useful for reproducing,
# kcov, gdb, afl, valgrind.
Expand All @@ -29,8 +17,6 @@ if(FMT_FUZZ_LINKMAIN)
add_definitions(-DIMPLEMENT_MAIN=1)
endif()



macro(implement_fuzzer sourcefile)
get_filename_component(basename ${sourcefile} NAME_WE)
set(name fuzzer_${basename})
Expand All @@ -39,7 +25,6 @@ macro(implement_fuzzer sourcefile)
if(FMT_FUZZ_LDFLAGS)
target_link_libraries(${name} PRIVATE ${FMT_FUZZ_LDFLAGS})
endif()
#set_property(TARGET ${name} PROPERTY CXX_STANDARD 17)
target_compile_features(${name} PRIVATE cxx_generic_lambdas)
endmacro()

Expand Down
10 changes: 10 additions & 0 deletions fuzzing/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
#!/bin/sh
#
# Creates fuzzer builds of various kinds
# - reproduce mode (no fuzzing, just enables replaying data through the fuzzers)
# - oss-fuzz emulated mode (makes sure a simulated invocation by oss-fuzz works)
# - libFuzzer build (you will need clang)
# - afl build (you will need afl)
#
#
# Copyright (c) 2019 Paul Dreik
#
# License: see LICENSE.rst in the fmt root directory

set -e
me=$(basename $0)
root=$(readlink -f "$(dirname "$0")/..")
Expand Down
3 changes: 3 additions & 0 deletions fuzzing/named_arg.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2019, Paul Dreik
// License: see LICENSE.rst in the fmt root directory

#include <cstdint>
#include <fmt/core.h>
#include <fmt/chrono.h>
Expand Down
3 changes: 3 additions & 0 deletions fuzzing/one_arg.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2019, Paul Dreik
// License: see LICENSE.rst in the fmt root directory

#include <cstdint>
#include <fmt/core.h>
#include <stdexcept>
Expand Down
2 changes: 2 additions & 0 deletions fuzzing/sprintf.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright (c) 2019, Paul Dreik
// License: see LICENSE.rst in the fmt root directory
#include <cstdint>
#include <fmt/core.h>
#include <fmt/printf.h>
Expand Down
2 changes: 2 additions & 0 deletions fuzzing/two_args.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright (c) 2019, Paul Dreik
// License: see LICENSE.rst in the fmt root directory
#include <cstdint>
#include <fmt/core.h>
#include <fmt/chrono.h>
Expand Down

0 comments on commit e2301f2

Please sign in to comment.