tinycodinglm / misc /misc-0008.jsonl
winapiadmin's picture
Upload folder using huggingface_hub (part 16)
d517dc9 verified
|
Raw History Blame Contribute Delete
1.48 kB
opencode trace
System You are an expert programmer.

You are an expert programmer.

User

Explain fuzzing methods and techniques

Assistant

Fuzzing: automated testing with random/mutated inputs to find bugs.

Types:

  • Generation-based: create inputs from scratch (grammar-based)
  • Mutation-based: mutate existing inputs (bit flips, insertions, deletions)

Coverage-guided: use code coverage feedback to guide mutations. Most effective approach.

Key tools:

  • AFL/AFL++: mutation-based, coverage-guided. Linux/macOS. Uses fork-server mode.
  • libFuzzer: in-process, coverage-guided. LLVM-based. Fast but crashes may kill harness.
  • Honggfuzz: multi-process, hardware feedback (Intel PT). Cross-platform.
  • OSS-Fuzz: Google's continuous fuzzing for open source. Free infrastructure.
  • Jazzer: Java fuzzing (JVM-based, built on libFuzzer).
  • go-fuzz: Go fuzzing. Coverage-guided.
  • Atheris: Python fuzzing (based on libFuzzer).

Fuzzing loop: input -> mutate -> execute -> check coverage -> if new coverage, add to corpus.

Corpus management: seed corpus of valid inputs. Minimize: remove bytes that don't affect coverage.

Sanitizers: ASAN (memory), UBSAN (undefined behavior), TSAN (threads). Compile with -fsanitize=address,undefined.