52 Commits

Author SHA1 Message Date
Dominik Maier
b035b70f4e
Expose OUT_DIR for compiler passes to other components (#840)
* Expose OUT_DIR for compiler passes to other components

* not updating nyx
2022-10-21 09:36:22 +02:00
Dominik Maier
94f0c7f56e
Moving to named parameters in format strings (#827)
* autofix

* you're just asking for a clamping

* autofmt on linux

* fix nits

* change back nit

* unfixing as u64 for GuestAddr

* fix

* ignoring clippy for GuestAddress
2022-10-11 13:45:01 +02:00
Dominik Maier
cc0c2f32ae
Additional errors only in test (#809) 2022-09-30 20:28:51 +02:00
David CARLIER
8cff2ce745
Reduce clang warnings for version output in libafl_cc. (#778) 2022-09-13 13:59:35 +02:00
Dominik Maier
5823320206
Fixes for new Clippy (#755) 2022-09-02 16:21:06 +02:00
Dongjia "toka" Zhang
2389f677f4
OSX force_load option (#743)
* Update clang.rs

* fmt
2022-08-27 09:51:11 -04:00
Dongjia Zhang
93c361bcd9
New Pass Manager Arguments (#724)
* new pm arguments

* enable abgeana's code
2022-08-18 19:26:52 +02:00
Dongjia Zhang
5d9a19f955
Mac OS Autotokens (#723)
* mac_tokens

* more

* win fix

* fmt

* fmt c
2022-08-13 02:58:22 +02:00
Alexandru Geană
c1aafe3e98
LLVM passes for Windows (#710)
* libafl_cc fixes for windows

* libafl_cc checks for llvm-config (again)

* libafl_cc clang-format

* libafl_cc fixes for macos

* maintain libafl_cc pass manager selection logic

* libafl_cc rustfmt
2022-08-12 20:25:59 +02:00
syheliel
2504b6dae3
Add rustfmt.toml (#722)
* add `rustfmt.toml`

* format fix

Co-authored-by: syheliel <syheliel@gmail.com>
2022-08-12 02:28:32 +02:00
Dongjia Zhang
999eaadc16
fix (#703) 2022-07-17 21:15:45 +02:00
Dongjia Zhang
49de0046e8
Fix AFLCoverage Pass & small fixes (#678)
* fix

* more

* declare LIBAFL_CC_LLVM_VERSION at least when no llvm-config found

* More llvm14 fixes
2022-06-23 17:55:06 +02:00
Andrea Fioraldi
323b8e23ee
LIBAFL_DEBUG_OUTPUT in Launcher and OnDiskTOMLMonitor to create fuzzer_stats (#666)
* LIBAFL_DEBUG_OUTPUT in launcher on unix

* OnDiskTOMLMonitor

* fix

* clp

* clippy

* fix

* fix

* allow all

Co-authored-by: tokatoka <tokazerkje@outlook.com>
2022-06-08 17:32:58 +02:00
Dominik Maier
bfe69aea09
Format C/Cpp code in ./scripts/fmt_all.sh (#653)
* format all (clang format 13)

* added clang-format check

* re-add missing newline

* cargo doc was missing

* more brackets

* fixed fmt workflow

* clang format

* shellcheck

* install clang-format-13

* update ubuntu for maximum clang-formattability

* yml whitespaces

* fmt

* shellcheck only for .sh

* oops path

* ignored shellcheck warning
2022-05-29 03:23:02 +02:00
Dongjia Zhang
afb32fb351
Cmplog New Pass Manager & LLVM 14 Fixes (#626)
* wip

* more

* match aflpp

* llvm14

* fix

* more llvm14

* check llvm version in libafl_cc

* safe access

* more

* fmt

* no windows

* no windows
2022-05-17 08:45:48 +02:00
Dongjia Zhang
a02b90be44
Autotokens New PM (#605)
* autotokens newpm

* typo

* fmt

* clp

* fix

* fix

* include &fmt

* include

* fmt

* llvm14 & clippy fix

* fix
2022-05-09 18:41:53 +09:00
Dongjia Zhang
6b76e53bfa
C(pp) formatting & autotokens fix (#614)
* fix

* a

* format

* .clang-format
2022-05-04 03:42:43 +09:00
Andrea Fioraldi
a99d0b2967
Fix clang linking without --libafl arg (#608)
* Fix clang linking without --libafl arg

* clippy
2022-04-12 20:34:38 +02:00
Andrea Fioraldi
e8f5949aec
Fix linking with -z defs (#601)
* Always link no-link-rt when not linking a fuzzer

* Handle dynamic

* fuzzbench

* Handle -z defs

* fix

* clippy

* clippy

* windowa

* fix
2022-04-08 18:06:27 +02:00
Chaofan Shou
4e3091eace
Dump Control Flow Graph in AFLCoverage LLVM Pass (#557)
* Allow dumping CFG in AFLCoverage pass

* Consider cases of edges from zeros to entry basic block.

* Expose public structs and traits

* linting

* fix doc

* clippy

* Remove unnecessary dependency

* add missing derive
2022-03-02 11:19:19 +01:00
Chaofan Shou
df84d39242
Add function call level granularity for coverage accounting (#552)
* Add func call level granularity for coverage accounting

* code linting
2022-02-24 10:16:12 +01:00
Dominik Maier
7dad2153e2
Clippy for Cargo (#532)
* Clippy for Cargo

* clippy fixes

* clippy fixes

* edition

* fix

* wrong self hidden

* fix

* more clippy
2022-02-11 14:34:01 +01:00
Andrea Fioraldi
0062bab412
libafl_cc: -fsanitize=fuzzer is an alias to --libafl (#518)
* libafl_cc: -fsanitize=fuzzer is an alias to --libafl

* no link runtime
2022-02-02 21:47:23 +01:00
Andrea Fioraldi
dd002a081b
Implement coverage accounting (BB metric atm) (#507)
* bb accounting llvm pass

* bb metric

* accoutning corpus scheduler

* fix warnings

* alloc

* clippy

* fix dockerfile

* clippy

* coverage accounting example

* finish CoverageAccountingCorpusScheduler

* fmt

* --libs in llvm-config

* merge
2022-02-01 14:08:38 +01:00
Dongjia Zhang
c61fed6ca9
Use Unix timer_* API instead of setitimer (#510)
* fix linter errors for armv7 (docs)

* introduce HasOnCrashReset trait; use timer_* API instead of setitimer for unix TimeoutExecutor

* fixes: PR #469 annotations and CI issues

* reintroduce setitimer for apple as macOS does not feature the POSIX timer API

* more macos and windows CI fixes

* more macos and windows CI fixes cont.

* HasOnCrashReset -> HasPostRunReset

* remove drop impl for Windows TimeoutExecutor

* adjust target cfgs for timeout stuff (android also did not work)

* add call to inner post_run_reset

* remove HasPostRunReset in favor of making it a trait fn of Executor

* add post_run_reset's to CombinedExecutor

* clippy: addr_of! instead of raw pointer casts

* link librt in libafl_cc (required by timer_* API)

* minor fixes and cleanup

* remove unused import for targets other than linux

* fix win

* merge

* fix

Co-authored-by: pr0me <g33sus@gmail.com>
2022-02-01 04:48:03 +01:00
Andrea Fioraldi
95ba7d61ce
remvoe fprintf from autotokens pass (#505) 2022-01-28 13:51:55 +01:00
Dongjia Zhang
62614ce101
LLVM AutoTokens (#470)
* posix dict2file llvm pass

* new PM

* working

* clean up

* fmt

* fix

* silence clippy

* bring the println back

* early return

* rename

* weak symbols

* linux onky

* fuzzbench change

* only linux

* linux only

* cfg

* cfg

* fix

* fix

* fix

* why

* fix

* bug fix

* rename

* rename

* macros & rename

* add_from_autotokens

* fix fuzzbench

* std -> core

* builder pattern?

* clippy

* wrong cfg

* cfgstd

* fuzzbench fmt

* no unsafe

* update fuzzbench_text

* use TokenSectiopn

Co-authored-by: Andrea Fioraldi <andreafioraldi@gmail.com>
2022-01-26 19:23:04 +01:00
Dominik Maier
2dd88998bd
Clippy fixes for latest toolchain (#471)
* from warning

* fix latest clippy

* clippy fixes++

* more nits
2022-01-17 11:02:42 +01:00
Andrea Fioraldi
9b3a435778
Add --libafl arg in libafl_cc and enable it for fuzzbench (#466) 2022-01-13 15:40:39 +01:00
Andrea Fioraldi
906bb4e653
--libaf-no-link (#464) 2022-01-13 10:03:02 +01:00
Dominik Maier
a1a6d5f478
Disable pita 🥙 compiler in debug mode (#454) 2022-01-04 16:20:52 +01:00
Dominik Maier
af3d321213
Derive debug for all structs in LibAFL (#442)
* documentation, warnings

* fixed docs

* docs

* no_std

* test

* windows

* nautilus docs

* more fixes

* more docs

* nits

* windows clippy

* docs, windows

* nits

* debug all the things

* derive debug for all core library components

* Docu for libafl_targets

* nits

* reordered generics

* add docs to frida, debug

* nits

* fixes

* more docu for frida, nits

* more docu

* more docu

* Sugar docs

* debug for qemu

* more debug

* import debug

* fmt

* debug

* anyap_debug feature no longer needed

* tidy up unused fn

* indicate if we left out values for struct debug

* implement Debug for sugar

* debug allthethings

* ci
2022-01-03 00:47:17 +01:00
Andrea Fioraldi
2fb1c3520a
More LLVM passes from AFL++ (#394)
* afl coverage pass

* working ctx coverage

* MAYBE_THREAD_LOCAL

* doh

* fix for msvc

* ci

* clippy

* atheris

* thread_local
2021-12-01 13:27:39 +01:00
Dominik Maier
5a722994ac
Still fixing CI (#305)
* clippy

* clippy on windows

* clippy fixes on windows

* clippy, fmt

* fixed testcases for windows

* fixing workspace.yml

* testcase no longer fails without clang

* fix github dependencies to specific revisions

* fix qemu without python

* cleanup HookResult
2021-09-29 17:58:09 +02:00
Dominik Maier
5caeb46b67
renamed target_os macos to target_vendor apple (#273)
* renamed target_os macos to target_vendor apple

* fix yaml
2021-08-23 09:45:25 +02:00
Dominik Maier
bb21ab7a63
Autolaunch ShMemService, add MacOS fuzzers to CI, various fixes (#246)
* starting to fix macos linker bugs

* mdetailed error prints

* start shmem service manually

* not a doc comment

* Some fixes

* only send exit msg to shmemservice when start was successful

* incorporated shmem service into provider

* removed unused imports

* trying to fix fuzzers

* fixed build

* check if join_handle is_some

* more debug prints

* fixed shmem service autolaunch

* fixed macos linker

* ignoring broken libpng testcase on macos for now (see #252)

* fmt

* try to fix missing llvm_config (see #253)

* empty issue template added

* Mmanually look for llvm-config on MacOS

* fixing CI

* fixed docs

* ignoring libmozjpg for CI, see #254
2021-08-09 01:10:29 +02:00
Andrea Fioraldi
5b76c22ea7
Cmplog routines mutator (#204)
* save

* routines in meta

* execute passes

* fix cmplog rtn pass

* clippy
2021-07-05 09:54:44 +02:00
Dominik Maier
5a4e5b0a93
MacOS Build (#197)
* macos build

* more fix

* fixed clang pass build

* fixes for libfuzzer link

* more explanation links
2021-06-30 21:20:24 +02:00
Andrea Fioraldi
5b54f0f068
Llvm passes (#185)
* enable llvm passes in libafl_cc

* cmplog rtn pass in fuzzbench fuzzer

* improve libafl_cc

* silence fuzzbench compiler wrapper

* instrumentation and runtime for rtn cmplog

* fix test

* fix test

* fuck clippy

* remove anon union in CmpLogMap

* windows.h

* remove libafl_targets_cmplog_wrapper

* no inline linking

* adapt fuzzers/
2021-06-23 09:38:15 +02:00
Andrea Fioraldi
abed61cc49 Propagate exit code in the compiler wrapper 2021-06-21 17:38:36 +02:00
Dominik Maier
dea21da5c3
fuzzbench harness (#165)
* starting to build fuzzbench harness

* fuzzbench updated

* fuzzbench example readme

* removed dummy files

* Intial de-luxe dockerfile added

* added to dockerignore

* more fuzzbench

* dockerfile

* final dockerfile fun

* fuzzing fixes, switched rand, build fixes

* fmt

* added dummy fuzzone

* silence wrapper output

* clippy

* logfile fixes

* adopt changes to libafl-cc

* various fixes
2021-06-16 18:24:07 +02:00
Andrea Fioraldi
1faadec106
Move win32 libs in libafl_cc and improve static lib linking (#176)
* Move win32 libs in libafl_cc and improve static lib linking

* fmt
2021-06-16 14:21:13 +02:00
Dominik Maier
022c12568b QoL improvements 2021-04-12 12:16:45 +02:00
Dominik Maier
ec55a03ec1 more clippy 2021-04-07 19:53:14 +02:00
Dominik Maier
8577d5c6a0 clippy fixes 2021-04-07 11:30:03 +02:00
andreafioraldi
40fe286cf9 run on win32 using the clang wrapper 2021-03-25 20:04:52 +01:00
Andrea Fioraldi
8d2713c4d9 libfuzzer_libpng wrappers 2021-03-24 15:28:58 +01:00
Andrea Fioraldi
1c8cdc76a8 create libafl_targets and start new structure for libfuzzer_libpng 2021-03-23 20:39:23 +01:00
Andrea Fioraldi
1d2897442b clang wrapper extend api 2021-03-23 14:55:55 +01:00
Andrea Fioraldi
0a3b9f1a96 fix libafl-cc test 2021-03-23 12:20:36 +01:00