Flutter Engine
The Flutter Engine
|
#include "fuzz/Fuzz.h"
#include "include/codec/SkCodec.h"
#include "include/core/SkBitmap.h"
#include "include/core/SkCanvas.h"
#include "include/core/SkData.h"
#include "include/core/SkFontMgr.h"
#include "include/core/SkImage.h"
#include "include/core/SkMallocPixelRef.h"
#include "include/core/SkPaint.h"
#include "include/core/SkPath.h"
#include "include/core/SkStream.h"
#include "include/core/SkSurface.h"
#include "include/core/SkTextBlob.h"
#include "include/encode/SkPngEncoder.h"
#include "src/core/SkOSFile.h"
#include "src/core/SkReadBuffer.h"
#include "src/utils/SkOSPath.h"
#include "tools/ToolUtils.h"
#include "tools/flags/CommandLineFlags.h"
#include "tools/fonts/FontToolUtils.h"
#include <iostream>
#include <map>
#include <regex>
#include <signal.h>
Go to the source code of this file.
Functions | |
static | DEFINE_string2 (bytes, b, "", "A path to a file or a directory. If a file, the " "contents will be used as the fuzz bytes. If a directory, all files " "in the directory will be used as fuzz bytes for the fuzzer, one at a " "time.") |
static | DEFINE_string2 (name, n, "", "If --type is 'api', fuzz the API with this name.") |
static | DEFINE_string2 (dump, d, "", "If not empty, dump 'image*' or 'skp' types as a " "PNG with this name.") |
static | DEFINE_int (loops, 1, "Run the fuzzer on each input this many times.") |
DEFINE_bool2 (verbose, v, false, "Print more information while fuzzing.") | |
static | DEFINE_string2 (type, t, "", g_type_message) |
static int | fuzz_file (const SkString &path, SkString type) |
static uint8_t | calculate_option (SkData *) |
static SkString | try_auto_detect (const SkString &path, SkString *name) |
static void | fuzz_android_codec (const sk_sp< SkData > &) |
static void | fuzz_animated_img (const sk_sp< SkData > &) |
static void | fuzz_api (const sk_sp< SkData > &, const SkString &name) |
static void | fuzz_color_deserialize (const sk_sp< SkData > &) |
static void | fuzz_colrv1 (const sk_sp< SkData > &) |
static void | fuzz_filter_fuzz (const sk_sp< SkData > &) |
static void | fuzz_image_decode (const sk_sp< SkData > &) |
static void | fuzz_image_decode_incremental (const sk_sp< SkData > &) |
static void | fuzz_img (const sk_sp< SkData > &, uint8_t, uint8_t) |
static void | fuzz_json (const sk_sp< SkData > &) |
static void | fuzz_parse_path (const sk_sp< SkData > &) |
static void | fuzz_path_deserialize (const sk_sp< SkData > &) |
static void | fuzz_region_deserialize (const sk_sp< SkData > &) |
static void | fuzz_region_set_path (const sk_sp< SkData > &) |
static void | fuzz_skdescriptor_deserialize (const sk_sp< SkData > &) |
static void | fuzz_skmeshspecification (const sk_sp< SkData > &) |
static void | fuzz_skp (const sk_sp< SkData > &) |
static void | fuzz_skruntimeblender (const sk_sp< SkData > &) |
static void | fuzz_skruntimecolorfilter (const sk_sp< SkData > &) |
static void | fuzz_skruntimeeffect (const sk_sp< SkData > &) |
static void | fuzz_sksl2glsl (const sk_sp< SkData > &) |
static void | fuzz_sksl2metal (const sk_sp< SkData > &) |
static void | fuzz_sksl2pipeline (const sk_sp< SkData > &) |
static void | fuzz_sksl2spirv (const sk_sp< SkData > &) |
static void | fuzz_sksl2wgsl (const sk_sp< SkData > &) |
static void | fuzz_textblob_deserialize (const sk_sp< SkData > &) |
static void | print_api_names () |
int | main (int argc, char **argv) |
void | FuzzJSON (const uint8_t *data, size_t size) |
void | FuzzCOLRv1 (const uint8_t *data, size_t size) |
static void | dump_png (const SkBitmap &bitmap) |
bool | FuzzAnimatedImage (const uint8_t *data, size_t size) |
bool | FuzzImageDecode (const uint8_t *data, size_t size) |
bool | FuzzIncrementalImageDecode (const uint8_t *data, size_t size) |
bool | FuzzAndroidCodec (const uint8_t *fuzzData, size_t fuzzSize, uint8_t sampleSize) |
void | FuzzSKP (const uint8_t *data, size_t size) |
void | FuzzColorspace (const uint8_t *data, size_t size) |
void | FuzzParsePath (const uint8_t *data, size_t size) |
void | FuzzPathDeserialize (const uint8_t *data, size_t size) |
bool | FuzzRegionDeserialize (const uint8_t *data, size_t size) |
void | FuzzTextBlobDeserialize (const uint8_t *data, size_t size) |
void | FuzzRegionSetPath (Fuzz *fuzz) |
void | FuzzImageFilterDeserialize (const uint8_t *data, size_t size) |
void | FuzzSkMeshSpecification (const uint8_t *fuzzData, size_t fuzzSize) |
bool | FuzzSkRuntimeBlender (const uint8_t *data, size_t size) |
bool | FuzzSkRuntimeColorFilter (const uint8_t *data, size_t size) |
bool | FuzzSkRuntimeEffect (const uint8_t *data, size_t size) |
bool | FuzzSKSL2GLSL (const uint8_t *data, size_t size) |
bool | FuzzSKSL2Metal (const uint8_t *data, size_t size) |
bool | FuzzSKSL2Pipeline (const uint8_t *data, size_t size) |
bool | FuzzSKSL2SPIRV (const uint8_t *data, size_t size) |
bool | FuzzSKSL2WGSL (const uint8_t *data, size_t size) |
void | FuzzSkDescriptorDeserialize (const uint8_t *data, size_t size) |
Variables | |
static constexpr char | g_type_message [] |
static std::map< std::string, std::string > | cf_api_map |
static std::map< std::string, std::string > | cf_map |
|
static |
Definition at line 428 of file FuzzMain.cpp.
DEFINE_bool2 | ( | verbose | , |
v | , | ||
false | , | ||
"Print more information while fuzzing." | |||
) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 458 of file FuzzMain.cpp.
Definition at line 498 of file FuzzMain.cpp.
Definition at line 468 of file FuzzMain.cpp.
Definition at line 444 of file FuzzMain.cpp.
Definition at line 757 of file FuzzMain.cpp.
Definition at line 418 of file FuzzMain.cpp.
Definition at line 158 of file FuzzMain.cpp.
Definition at line 803 of file FuzzMain.cpp.
Definition at line 478 of file FuzzMain.cpp.
Definition at line 488 of file FuzzMain.cpp.
Definition at line 512 of file FuzzMain.cpp.
Definition at line 393 of file FuzzMain.cpp.
Definition at line 764 of file FuzzMain.cpp.
Definition at line 771 of file FuzzMain.cpp.
Definition at line 778 of file FuzzMain.cpp.
Definition at line 795 of file FuzzMain.cpp.
Definition at line 897 of file FuzzMain.cpp.
Definition at line 810 of file FuzzMain.cpp.
Definition at line 750 of file FuzzMain.cpp.
Definition at line 817 of file FuzzMain.cpp.
Definition at line 827 of file FuzzMain.cpp.
Definition at line 837 of file FuzzMain.cpp.
Definition at line 847 of file FuzzMain.cpp.
Definition at line 857 of file FuzzMain.cpp.
Definition at line 867 of file FuzzMain.cpp.
Definition at line 877 of file FuzzMain.cpp.
Definition at line 887 of file FuzzMain.cpp.
Definition at line 788 of file FuzzMain.cpp.
bool FuzzAndroidCodec | ( | const uint8_t * | fuzzData, |
size_t | fuzzSize, | ||
uint8_t | sampleSize | ||
) |
Definition at line 17 of file FuzzAndroidCodec.cpp.
bool FuzzAnimatedImage | ( | const uint8_t * | data, |
size_t | size | ||
) |
Definition at line 14 of file FuzzAnimatedImage.cpp.
void FuzzColorspace | ( | const uint8_t * | data, |
size_t | size | ||
) |
Definition at line 13 of file FuzzColorspace.cpp.
void FuzzCOLRv1 | ( | const uint8_t * | data, |
size_t | size | ||
) |
Definition at line 19 of file FuzzCOLRv1.cpp.
bool FuzzImageDecode | ( | const uint8_t * | data, |
size_t | size | ||
) |
Definition at line 14 of file FuzzImage.cpp.
void FuzzImageFilterDeserialize | ( | const uint8_t * | data, |
size_t | size | ||
) |
Definition at line 16 of file FuzzImageFilterDeserialize.cpp.
bool FuzzIncrementalImageDecode | ( | const uint8_t * | data, |
size_t | size | ||
) |
Definition at line 13 of file FuzzIncrementalImage.cpp.
void FuzzJSON | ( | const uint8_t * | data, |
size_t | size | ||
) |
Definition at line 11 of file FuzzJSON.cpp.
void FuzzParsePath | ( | const uint8_t * | data, |
size_t | size | ||
) |
Definition at line 12 of file FuzzParsePath.cpp.
void FuzzPathDeserialize | ( | const uint8_t * | data, |
size_t | size | ||
) |
Definition at line 14 of file FuzzPathDeserialize.cpp.
bool FuzzRegionDeserialize | ( | const uint8_t * | data, |
size_t | size | ||
) |
Definition at line 14 of file FuzzRegionDeserialize.cpp.
void FuzzRegionSetPath | ( | Fuzz * | fuzz | ) |
Definition at line 14 of file FuzzRegionSetPath.cpp.
void FuzzSkDescriptorDeserialize | ( | const uint8_t * | data, |
size_t | size | ||
) |
Definition at line 11 of file FuzzSkDescriptorDeserialize.cpp.
void FuzzSkMeshSpecification | ( | const uint8_t * | fuzzData, |
size_t | fuzzSize | ||
) |
Definition at line 26 of file FuzzSkMeshSpecification.cpp.
void FuzzSKP | ( | const uint8_t * | data, |
size_t | size | ||
) |
Definition at line 15 of file FuzzSKP.cpp.
bool FuzzSkRuntimeBlender | ( | const uint8_t * | data, |
size_t | size | ||
) |
Definition at line 59 of file FuzzSkRuntimeBlender.cpp.
bool FuzzSkRuntimeColorFilter | ( | const uint8_t * | data, |
size_t | size | ||
) |
Definition at line 59 of file FuzzSkRuntimeColorFilter.cpp.
bool FuzzSkRuntimeEffect | ( | const uint8_t * | data, |
size_t | size | ||
) |
Definition at line 58 of file FuzzSkRuntimeEffect.cpp.
bool FuzzSKSL2GLSL | ( | const uint8_t * | data, |
size_t | size | ||
) |
Definition at line 17 of file FuzzSKSL2GLSL.cpp.
bool FuzzSKSL2Metal | ( | const uint8_t * | data, |
size_t | size | ||
) |
Definition at line 17 of file FuzzSKSL2Metal.cpp.
bool FuzzSKSL2Pipeline | ( | const uint8_t * | data, |
size_t | size | ||
) |
Definition at line 18 of file FuzzSKSL2Pipeline.cpp.
bool FuzzSKSL2SPIRV | ( | const uint8_t * | data, |
size_t | size | ||
) |
Definition at line 17 of file FuzzSKSL2SPIRV.cpp.
bool FuzzSKSL2WGSL | ( | const uint8_t * | data, |
size_t | size | ||
) |
Definition at line 17 of file FuzzSKSL2WGSL.cpp.
void FuzzTextBlobDeserialize | ( | const uint8_t * | data, |
size_t | size | ||
) |
Definition at line 15 of file FuzzTextBlobDeserialize.cpp.
Definition at line 120 of file FuzzMain.cpp.
|
static |
Definition at line 437 of file FuzzMain.cpp.
Definition at line 360 of file FuzzMain.cpp.
|
static |
Definition at line 306 of file FuzzMain.cpp.
|
static |
Definition at line 331 of file FuzzMain.cpp.
|
staticconstexpr |
Definition at line 45 of file FuzzMain.cpp.