Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Debugging

Tips

  • Try set -x in Bash
  • Use the gdb Python interface (see gdb)
  • Use strace

Tools

creduce

creduce

apt-get update && apt-get install -y creduce
creduce --sllooww --timeout 60 --n $(nproc) reduce.sh file.c

halfempty

halfempty

git clone --branch=master --depth=1 --single-branch https://github.com/googleprojectzero/halfempty
cd halfempty
apt-get update -q
apt-get install -q -y libglib2.0-dev
make -j
#!/usr/bin/env bash

set -eux

result=1
trap 'exit ${result}' EXIT TERM ALRM

if grep interesting /dev/stdin; then
    result=0 # We want this input
else
    result=1 # We don't want this input
fi
exit "${result}"
./halfempty/halfempty --stable --gen-intermediate --output=halfempty.out test.sh input-file

Further reading