Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(254)

Unified Diff: fuzz/Fuzz.h

Issue 1585353002: fuzz: signalBug() / signalBoring() (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: stdlib for abs() Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | fuzz/FuzzPaeth.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fuzz/Fuzz.h
diff --git a/fuzz/Fuzz.h b/fuzz/Fuzz.h
index f5083ef8e68ab9b19aa55730ee771d4274405986..0f34ef4b3ef7a36a6dd5a4c84e3f91d8bfe03260 100644
--- a/fuzz/Fuzz.h
+++ b/fuzz/Fuzz.h
@@ -11,7 +11,6 @@
#include "SkData.h"
#include "SkTRegistry.h"
#include "SkTypes.h"
-#include <stdlib.h>
class Fuzz : SkNoncopyable {
public:
@@ -21,7 +20,13 @@ public:
uint32_t nextU();
float nextF();
+ void signalBug (); // Tell afl-fuzz these inputs found a bug.
+ void signalBoring(); // Tell afl-fuzz these inputs are not worth testing.
+
private:
+ template <typename T>
+ T nextT();
+
SkAutoTUnref<SkData> fBytes;
int fNextByte;
};
@@ -36,6 +41,4 @@ struct Fuzzable {
SkTRegistry<Fuzzable> register_##name({#name, fuzz_##name}); \
static void fuzz_##name(Fuzz* f)
-#define ASSERT(cond) do { if (!(cond)) abort(); } while(false)
-
#endif//Fuzz_DEFINED
« no previous file with comments | « no previous file | fuzz/FuzzPaeth.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698