Fuzz testing debug tool

Add code to run a fuzz tester, simulating (more-or-less) random
keyboard mashing. There's no option to turn it on, you need to
set iflags.debug_fuzzer on via a debugger or something along
those lines.
This commit is contained in:
Pasi Kallinen
2018-11-08 15:55:49 +02:00
parent 4f541fe216
commit 0bb6754998
14 changed files with 76 additions and 3 deletions
+2
View File
@@ -453,6 +453,8 @@ VA_DECL(const char *, s)
Vsprintf(pbuf, s, VA_ARGS);
pbuf[BUFSZ - 1] = '\0'; /* sanity */
paniclog("impossible", pbuf);
if (iflags.debug_fuzzer)
panic(pbuf);
pline("%s", VA_PASS1(pbuf));
pline(VA_PASS1(
"Program in disorder! (Saving and reloading may fix this problem.)"));