-
Notifications
You must be signed in to change notification settings - Fork 387
How To Debug Fuzzer (ASAN enabled executable)
Timur Safin edited this page Mar 28, 2023
·
1 revision
- Let assume you have already built fuzzer via some set of instructions given elsewhere:
CC=clang-17 \
CXX=clang++-17 \
cmake -DENABLE_ASAN=ON \
-DENABLE_FUZZER=ON \
-DCMAKE_BUILD_TYPE=Debug \
..
make -j datetime_strptime_fuzzer
-
If you run this freshly built
test/fuzz/datetime_strptime_fuzzer
it crashes; -
Then how to debug this fuzzer in
gdb
so it will stop at the moment of error report, and give you chance to look around?
$ cat .gdbinit
b abort
$ ASAN_OPTIONS=abort_on_error=1 \
gdb --args ./test/fuzz/datetime_strptime_fuzzer ./crash-24f6659811e32d67dd14bbf965dbee0c38969dcf
Where ./crash-xxxx
is a file created by prior fuzzer run, at the moment of crash.
ASAN_OPTIONS=abort_on_error=1
makes ASAN to callabort()
function at the moment of crash, otherwise it's being shutdown using different, not interceptible in debugger means.
- C coding guidelines ↗
- Lua coding guidelines ↗
- Python coding guidelines ↗
- Maintainer's guide
- Debugging
Architecture
- Server architecture
- R tree index quick start and usage
- LuaJIT
- Vinyl
- Vinyl Architecture
- Vinyl Disk Layout
- Vinyl math
- Vinyl Cookbook
- Bullet1
- SQL
- Appserver modules
- Testing
- Performance
- Privileges and Access control
How To ...?
- ... configure build system
- ... add new fuzzers
- ... build RPM or Deb package using packpack
- ... calculate memory size
- ... debug core dump of stripped tarantool
- ... debug core from different OS
- ... debug fuzzer
- ... generate new bootstrap snapshot
- ... use Address Sanitizer
- ... collect a coredump
- ... generate luacov report for builtin module
- ... verify modified lua files via luacheck
- ... verify Lua files in third_party?
- ... rerun failed jobs
- ... update a third party repository
- Fix wrong decimal indexing after upgrade to 2.10.1
- Caveats when upgrading a cluster on Tarantool 1.6
- Fix illegal field type in a space format when upgrading to 2.10.4
Useful links