Make it Fail ============ Making a system fail reproducibly is an important step in debugging. It allows you to investigate the problem when it occurs so you can determine the cause. It also allows you to have confidence that a fix actually removes the failure. Here are some approaches to making a system fail. * Use tools that analyse code or systematically add runtime checks to catch problems. Such tools include: * The Address Sanitizer :ref:`asan` * The Valgrind framework for dynamic analysis (:ref:`valgrind`) * The debugging compiler :ref:`dcc` that combines the two above. * Ensure you keep core dumps, as you go through the process of making your program fail. You can analyse this using GDB later on (:ref:`gdb_coredumps`) * Test as many scenarios as possible and record which ones trigger the bug and which do not. * Insert assertions that fail when impossible conditions occur (:ref:`kassert`)