2019-01-17 10:19:54 +00:00
|
|
|
add_custom_target(ossfuzz)
|
2018-02-06 09:57:16 +00:00
|
|
|
add_dependencies(ossfuzz
|
|
|
|
solc_opt_ossfuzz
|
2020-08-27 17:07:11 +00:00
|
|
|
solc_opt_mutator_ossfuzz
|
2018-02-06 09:57:16 +00:00
|
|
|
solc_noopt_ossfuzz
|
2020-08-27 17:07:11 +00:00
|
|
|
solc_noopt_mutator_ossfuzz
|
2018-02-06 09:57:16 +00:00
|
|
|
const_opt_ossfuzz
|
|
|
|
strictasm_diff_ossfuzz
|
2019-02-06 10:18:44 +00:00
|
|
|
strictasm_opt_ossfuzz
|
|
|
|
strictasm_assembly_ossfuzz
|
2020-08-27 17:07:11 +00:00
|
|
|
)
|
2019-01-17 10:19:54 +00:00
|
|
|
|
2019-05-22 08:15:28 +00:00
|
|
|
if (OSSFUZZ)
|
2019-07-08 14:04:52 +00:00
|
|
|
add_custom_target(ossfuzz_proto)
|
2019-11-18 11:12:30 +00:00
|
|
|
add_dependencies(ossfuzz_proto
|
2020-12-08 20:06:10 +00:00
|
|
|
sol_proto_ossfuzz
|
|
|
|
yul_proto_ossfuzz
|
|
|
|
yul_proto_diff_ossfuzz
|
|
|
|
yul_proto_diff_custom_mutate_ossfuzz
|
2019-11-18 11:12:30 +00:00
|
|
|
)
|
2019-07-08 14:04:52 +00:00
|
|
|
|
|
|
|
add_custom_target(ossfuzz_abiv2)
|
2020-12-08 10:16:00 +00:00
|
|
|
add_dependencies(ossfuzz_abiv2 abiv2_proto_ossfuzz abiv2_isabelle_ossfuzz)
|
2019-05-22 08:15:28 +00:00
|
|
|
endif()
|
2019-01-17 10:19:54 +00:00
|
|
|
|
2019-05-22 08:15:28 +00:00
|
|
|
if (OSSFUZZ)
|
2020-08-26 09:37:40 +00:00
|
|
|
add_executable(solc_opt_ossfuzz
|
|
|
|
solc_opt_ossfuzz.cpp
|
|
|
|
../fuzzer_common.cpp
|
|
|
|
../../TestCaseReader.cpp
|
|
|
|
)
|
2020-10-15 10:59:18 +00:00
|
|
|
target_link_libraries(solc_opt_ossfuzz PRIVATE libsolc evmasm)
|
2019-09-16 14:18:27 +00:00
|
|
|
set_target_properties(solc_opt_ossfuzz PROPERTIES LINK_FLAGS ${LIB_FUZZING_ENGINE})
|
2019-05-22 08:15:28 +00:00
|
|
|
|
2020-08-27 17:07:11 +00:00
|
|
|
add_executable(solc_opt_mutator_ossfuzz
|
|
|
|
solc_opt_ossfuzz.cpp
|
|
|
|
../fuzzer_common.cpp
|
|
|
|
../../TestCaseReader.cpp
|
|
|
|
SolidityGenerator.cpp
|
|
|
|
SolidityCustomMutatorInterface.cpp
|
|
|
|
)
|
|
|
|
target_link_libraries(solc_opt_mutator_ossfuzz PRIVATE libsolc evmasm)
|
|
|
|
set_target_properties(solc_opt_mutator_ossfuzz PROPERTIES LINK_FLAGS ${LIB_FUZZING_ENGINE})
|
|
|
|
|
2020-08-26 09:37:40 +00:00
|
|
|
add_executable(solc_noopt_ossfuzz
|
|
|
|
solc_noopt_ossfuzz.cpp
|
|
|
|
../fuzzer_common.cpp
|
|
|
|
../../TestCaseReader.cpp
|
|
|
|
)
|
2020-10-15 10:59:18 +00:00
|
|
|
target_link_libraries(solc_noopt_ossfuzz PRIVATE libsolc evmasm)
|
2019-09-16 14:18:27 +00:00
|
|
|
set_target_properties(solc_noopt_ossfuzz PROPERTIES LINK_FLAGS ${LIB_FUZZING_ENGINE})
|
2019-05-22 08:15:28 +00:00
|
|
|
|
2020-08-27 17:07:11 +00:00
|
|
|
add_executable(solc_noopt_mutator_ossfuzz
|
|
|
|
solc_noopt_ossfuzz.cpp
|
|
|
|
../fuzzer_common.cpp
|
|
|
|
../../TestCaseReader.cpp
|
|
|
|
SolidityGenerator.cpp
|
|
|
|
SolidityCustomMutatorInterface.cpp
|
|
|
|
)
|
|
|
|
target_link_libraries(solc_noopt_mutator_ossfuzz PRIVATE libsolc evmasm)
|
|
|
|
set_target_properties(solc_noopt_mutator_ossfuzz PROPERTIES LINK_FLAGS ${LIB_FUZZING_ENGINE})
|
|
|
|
|
2019-05-22 08:15:28 +00:00
|
|
|
add_executable(const_opt_ossfuzz const_opt_ossfuzz.cpp ../fuzzer_common.cpp)
|
2019-09-12 09:26:05 +00:00
|
|
|
target_link_libraries(const_opt_ossfuzz PRIVATE libsolc evmasm)
|
2019-09-16 14:18:27 +00:00
|
|
|
set_target_properties(const_opt_ossfuzz PROPERTIES LINK_FLAGS ${LIB_FUZZING_ENGINE})
|
2019-05-22 08:15:28 +00:00
|
|
|
|
|
|
|
add_executable(strictasm_diff_ossfuzz strictasm_diff_ossfuzz.cpp yulFuzzerCommon.cpp)
|
2019-09-12 09:26:05 +00:00
|
|
|
target_link_libraries(strictasm_diff_ossfuzz PRIVATE libsolc evmasm yulInterpreter)
|
2019-09-16 14:18:27 +00:00
|
|
|
set_target_properties(strictasm_diff_ossfuzz PROPERTIES LINK_FLAGS ${LIB_FUZZING_ENGINE})
|
2019-05-22 08:15:28 +00:00
|
|
|
|
|
|
|
add_executable(strictasm_opt_ossfuzz strictasm_opt_ossfuzz.cpp)
|
2019-09-12 09:26:05 +00:00
|
|
|
target_link_libraries(strictasm_opt_ossfuzz PRIVATE yul)
|
2019-09-16 14:18:27 +00:00
|
|
|
set_target_properties(strictasm_opt_ossfuzz PROPERTIES LINK_FLAGS ${LIB_FUZZING_ENGINE})
|
2019-05-22 08:15:28 +00:00
|
|
|
|
|
|
|
add_executable(strictasm_assembly_ossfuzz strictasm_assembly_ossfuzz.cpp)
|
2019-09-12 09:26:05 +00:00
|
|
|
target_link_libraries(strictasm_assembly_ossfuzz PRIVATE yul)
|
2019-09-16 14:18:27 +00:00
|
|
|
set_target_properties(strictasm_assembly_ossfuzz PROPERTIES LINK_FLAGS ${LIB_FUZZING_ENGINE})
|
2019-05-22 08:15:28 +00:00
|
|
|
|
|
|
|
add_executable(yul_proto_ossfuzz yulProtoFuzzer.cpp protoToYul.cpp yulProto.pb.cc)
|
2019-07-15 16:15:45 +00:00
|
|
|
target_include_directories(yul_proto_ossfuzz PRIVATE /usr/include/libprotobuf-mutator)
|
2019-07-09 16:16:34 +00:00
|
|
|
target_link_libraries(yul_proto_ossfuzz PRIVATE yul
|
2019-05-22 08:15:28 +00:00
|
|
|
protobuf-mutator-libfuzzer.a
|
|
|
|
protobuf-mutator.a
|
|
|
|
protobuf.a
|
2019-09-12 09:26:05 +00:00
|
|
|
)
|
2019-09-16 14:18:27 +00:00
|
|
|
set_target_properties(yul_proto_ossfuzz PROPERTIES LINK_FLAGS ${LIB_FUZZING_ENGINE})
|
2020-12-08 20:06:10 +00:00
|
|
|
target_compile_options(yul_proto_ossfuzz PUBLIC ${COMPILE_OPTIONS} -Wno-sign-conversion -Wno-suggest-destructor-override -Wno-inconsistent-missing-destructor-override)
|
2019-05-22 08:15:28 +00:00
|
|
|
|
|
|
|
add_executable(yul_proto_diff_ossfuzz yulProto_diff_ossfuzz.cpp yulFuzzerCommon.cpp protoToYul.cpp yulProto.pb.cc)
|
2019-07-15 16:15:45 +00:00
|
|
|
target_include_directories(yul_proto_diff_ossfuzz PRIVATE /usr/include/libprotobuf-mutator)
|
2019-07-09 16:16:34 +00:00
|
|
|
target_link_libraries(yul_proto_diff_ossfuzz PRIVATE yul
|
2019-05-22 08:15:28 +00:00
|
|
|
yulInterpreter
|
|
|
|
protobuf-mutator-libfuzzer.a
|
|
|
|
protobuf-mutator.a
|
|
|
|
protobuf.a
|
2019-09-12 09:26:05 +00:00
|
|
|
)
|
2019-09-16 14:18:27 +00:00
|
|
|
set_target_properties(yul_proto_diff_ossfuzz PROPERTIES LINK_FLAGS ${LIB_FUZZING_ENGINE})
|
2020-12-08 20:06:10 +00:00
|
|
|
target_compile_options(yul_proto_diff_ossfuzz PUBLIC ${COMPILE_OPTIONS} -Wno-sign-conversion -Wno-suggest-destructor-override -Wno-inconsistent-missing-destructor-override)
|
2019-07-08 14:04:52 +00:00
|
|
|
|
2019-11-18 11:12:30 +00:00
|
|
|
add_executable(yul_proto_diff_custom_mutate_ossfuzz
|
|
|
|
yulProto_diff_ossfuzz.cpp
|
|
|
|
yulFuzzerCommon.cpp
|
|
|
|
protoToYul.cpp
|
|
|
|
yulProto.pb.cc
|
|
|
|
protomutators/YulProtoMutator.cpp
|
2020-08-27 17:07:11 +00:00
|
|
|
)
|
2019-11-18 11:12:30 +00:00
|
|
|
target_include_directories(yul_proto_diff_custom_mutate_ossfuzz PRIVATE /usr/include/libprotobuf-mutator)
|
|
|
|
target_link_libraries(yul_proto_diff_custom_mutate_ossfuzz PRIVATE yul
|
|
|
|
yulInterpreter
|
|
|
|
protobuf-mutator-libfuzzer.a
|
|
|
|
protobuf-mutator.a
|
|
|
|
protobuf.a
|
2020-08-27 17:07:11 +00:00
|
|
|
)
|
2019-11-18 11:12:30 +00:00
|
|
|
set_target_properties(yul_proto_diff_custom_mutate_ossfuzz PROPERTIES LINK_FLAGS ${LIB_FUZZING_ENGINE})
|
2020-12-08 20:06:10 +00:00
|
|
|
target_compile_options(yul_proto_diff_custom_mutate_ossfuzz PUBLIC ${COMPILE_OPTIONS} -Wno-sign-conversion -Wno-suggest-destructor-override -Wno-inconsistent-missing-destructor-override)
|
2019-11-18 11:12:30 +00:00
|
|
|
|
2019-07-08 14:04:52 +00:00
|
|
|
add_executable(abiv2_proto_ossfuzz
|
|
|
|
../../EVMHost.cpp
|
|
|
|
abiV2ProtoFuzzer.cpp
|
|
|
|
abiV2FuzzerCommon.cpp
|
|
|
|
protoToAbiV2.cpp
|
|
|
|
abiV2Proto.pb.cc
|
|
|
|
)
|
|
|
|
target_include_directories(abiv2_proto_ossfuzz PRIVATE
|
2019-07-16 09:11:20 +00:00
|
|
|
/usr/include/libprotobuf-mutator
|
2019-07-08 14:04:52 +00:00
|
|
|
)
|
|
|
|
target_link_libraries(abiv2_proto_ossfuzz PRIVATE solidity
|
2019-11-13 12:07:41 +00:00
|
|
|
evmc
|
|
|
|
evmone-standalone
|
2019-07-08 14:04:52 +00:00
|
|
|
protobuf-mutator-libfuzzer.a
|
|
|
|
protobuf-mutator.a
|
|
|
|
protobuf.a
|
|
|
|
)
|
2019-09-16 14:18:27 +00:00
|
|
|
set_target_properties(abiv2_proto_ossfuzz PROPERTIES LINK_FLAGS ${LIB_FUZZING_ENGINE})
|
2020-12-08 20:06:10 +00:00
|
|
|
target_compile_options(abiv2_proto_ossfuzz PUBLIC ${COMPILE_OPTIONS} -Wno-sign-conversion -Wno-suggest-destructor-override -Wno-inconsistent-missing-destructor-override)
|
2020-04-20 14:08:31 +00:00
|
|
|
|
2020-12-08 10:16:00 +00:00
|
|
|
add_executable(abiv2_isabelle_ossfuzz
|
|
|
|
../../EVMHost.cpp
|
|
|
|
AbiV2IsabelleFuzzer.cpp
|
|
|
|
abiV2FuzzerCommon.cpp
|
|
|
|
protoToAbiV2.cpp
|
|
|
|
abiV2Proto.pb.cc
|
|
|
|
)
|
|
|
|
target_include_directories(abiv2_isabelle_ossfuzz PRIVATE
|
|
|
|
/usr/include/libprotobuf-mutator
|
|
|
|
)
|
|
|
|
target_link_libraries(abiv2_isabelle_ossfuzz PRIVATE solidity
|
|
|
|
evmc
|
|
|
|
evmone-standalone
|
|
|
|
protobuf-mutator-libfuzzer.a
|
|
|
|
protobuf-mutator.a
|
|
|
|
protobuf.a
|
|
|
|
abicoder
|
|
|
|
gmp
|
|
|
|
)
|
|
|
|
set_target_properties(abiv2_isabelle_ossfuzz PROPERTIES LINK_FLAGS ${LIB_FUZZING_ENGINE})
|
2020-12-08 20:06:10 +00:00
|
|
|
target_compile_options(abiv2_isabelle_ossfuzz PUBLIC ${COMPILE_OPTIONS} -Wno-sign-conversion -Wno-suggest-destructor-override -Wno-inconsistent-missing-destructor-override)
|
2020-12-08 10:16:00 +00:00
|
|
|
|
2020-04-20 14:08:31 +00:00
|
|
|
add_executable(sol_proto_ossfuzz
|
|
|
|
solProtoFuzzer.cpp
|
|
|
|
protoToSol.cpp
|
|
|
|
solProto.pb.cc
|
|
|
|
abiV2FuzzerCommon.cpp
|
|
|
|
../../EVMHost.cpp
|
|
|
|
)
|
|
|
|
target_include_directories(sol_proto_ossfuzz PRIVATE
|
|
|
|
/usr/include/libprotobuf-mutator
|
|
|
|
)
|
|
|
|
target_link_libraries(sol_proto_ossfuzz PRIVATE solidity libsolc
|
|
|
|
evmc
|
|
|
|
evmone-standalone
|
|
|
|
protobuf-mutator-libfuzzer.a
|
|
|
|
protobuf-mutator.a
|
|
|
|
protobuf.a
|
|
|
|
)
|
|
|
|
set_target_properties(sol_proto_ossfuzz PROPERTIES LINK_FLAGS ${LIB_FUZZING_ENGINE})
|
2020-12-08 20:06:10 +00:00
|
|
|
target_compile_options(sol_proto_ossfuzz PUBLIC ${COMPILE_OPTIONS} -Wno-sign-conversion -Wno-suggest-destructor-override -Wno-inconsistent-missing-destructor-override)
|
2019-05-22 08:15:28 +00:00
|
|
|
else()
|
|
|
|
add_library(solc_opt_ossfuzz
|
|
|
|
solc_opt_ossfuzz.cpp
|
|
|
|
../fuzzer_common.cpp
|
|
|
|
)
|
|
|
|
target_link_libraries(solc_opt_ossfuzz PRIVATE libsolc evmasm)
|
|
|
|
|
2020-08-27 17:07:11 +00:00
|
|
|
add_library(solc_opt_mutator_ossfuzz
|
|
|
|
solc_opt_ossfuzz.cpp
|
|
|
|
../fuzzer_common.cpp
|
|
|
|
)
|
|
|
|
target_link_libraries(solc_opt_mutator_ossfuzz PRIVATE libsolc evmasm)
|
|
|
|
|
2019-05-22 08:15:28 +00:00
|
|
|
add_library(solc_noopt_ossfuzz
|
|
|
|
solc_noopt_ossfuzz.cpp
|
|
|
|
../fuzzer_common.cpp
|
|
|
|
)
|
|
|
|
target_link_libraries(solc_noopt_ossfuzz PRIVATE libsolc evmasm)
|
|
|
|
|
2020-08-27 17:07:11 +00:00
|
|
|
add_library(solc_noopt_mutator_ossfuzz
|
|
|
|
solc_noopt_ossfuzz.cpp
|
|
|
|
../fuzzer_common.cpp
|
|
|
|
)
|
|
|
|
target_link_libraries(solc_noopt_mutator_ossfuzz PRIVATE libsolc evmasm)
|
|
|
|
|
2019-05-22 08:15:28 +00:00
|
|
|
add_library(const_opt_ossfuzz
|
|
|
|
const_opt_ossfuzz.cpp
|
|
|
|
../fuzzer_common.cpp)
|
|
|
|
target_link_libraries(const_opt_ossfuzz PRIVATE libsolc evmasm)
|
|
|
|
|
|
|
|
add_library(strictasm_diff_ossfuzz
|
|
|
|
strictasm_diff_ossfuzz.cpp
|
|
|
|
yulFuzzerCommon.cpp
|
|
|
|
)
|
|
|
|
target_link_libraries(strictasm_diff_ossfuzz PRIVATE libsolc evmasm yulInterpreter)
|
|
|
|
|
|
|
|
add_library(strictasm_opt_ossfuzz
|
|
|
|
strictasm_opt_ossfuzz.cpp
|
|
|
|
)
|
|
|
|
target_link_libraries(strictasm_opt_ossfuzz PRIVATE yul)
|
|
|
|
|
|
|
|
add_library(strictasm_assembly_ossfuzz
|
|
|
|
strictasm_assembly_ossfuzz.cpp
|
|
|
|
)
|
|
|
|
target_link_libraries(strictasm_assembly_ossfuzz PRIVATE yul)
|
|
|
|
|
|
|
|
# add_executable(yul_proto_ossfuzz yulProtoFuzzer.cpp protoToYul.cpp yulProto.pb.cc)
|
|
|
|
# target_include_directories(yul_proto_ossfuzz PRIVATE /src/libprotobuf-mutator /src/LPM/external.protobuf/include)
|
2019-07-09 16:16:34 +00:00
|
|
|
# target_link_libraries(yul_proto_ossfuzz PRIVATE yul
|
2019-05-22 08:15:28 +00:00
|
|
|
# protobuf-mutator-libfuzzer.a
|
|
|
|
# protobuf-mutator.a
|
|
|
|
# protobuf.a
|
|
|
|
# FuzzingEngine.a)
|
|
|
|
#
|
|
|
|
# add_executable(yul_proto_diff_ossfuzz yulProto_diff_ossfuzz.cpp yulFuzzerCommon.cpp protoToYul.cpp yulProto.pb.cc)
|
|
|
|
# target_include_directories(yul_proto_diff_ossfuzz PRIVATE /src/libprotobuf-mutator /src/LPM/external.protobuf/include)
|
2019-07-09 16:16:34 +00:00
|
|
|
# target_link_libraries(yul_proto_diff_ossfuzz PRIVATE yul
|
2019-05-22 08:15:28 +00:00
|
|
|
# yulInterpreter
|
|
|
|
# protobuf-mutator-libfuzzer.a
|
|
|
|
# protobuf-mutator.a
|
|
|
|
# protobuf.a
|
|
|
|
# FuzzingEngine.a)
|
2019-07-08 14:04:52 +00:00
|
|
|
# add_executable(abiv2_proto_ossfuzz
|
|
|
|
# ../../EVMHost.cpp
|
|
|
|
# abiV2ProtoFuzzer.cpp
|
|
|
|
# abiV2FuzzerCommon.cpp
|
|
|
|
# protoToAbiV2.cpp
|
|
|
|
# abiV2Proto.pb.cc
|
|
|
|
# )
|
|
|
|
# target_include_directories(abiv2_proto_ossfuzz PRIVATE
|
|
|
|
# /src/LPM/external.protobuf/include
|
|
|
|
# /src/libprotobuf-mutator
|
|
|
|
# /src/evmone/include
|
|
|
|
# )
|
|
|
|
# target_link_libraries(abiv2_proto_ossfuzz PRIVATE solidity
|
|
|
|
# evmone intx ethash keccak evmc-instructions evmc
|
|
|
|
# protobuf-mutator-libfuzzer.a
|
|
|
|
# protobuf-mutator.a
|
|
|
|
# protobuf.a
|
|
|
|
# FuzzingEngine.a
|
|
|
|
# )
|
2019-07-09 16:16:34 +00:00
|
|
|
endif()
|