diff options
| author | van Hauser <vh@thc.org> | 2022-03-08 11:44:15 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-08 11:44:15 +0100 |
| commit | 34d7a6357ed7bab5a934fdaf2622c72ad27c8f28 (patch) | |
| tree | 2c88b9aaa9e42a51a52a69454717892c8f394d6c /frida_mode/ts/lib/afl.ts | |
| parent | ae9897ff7b31b9135b85f78a9a0e4c036d8a0abd (diff) | |
| parent | 852c036cae97113daac3ba5a791554bbbd5c8903 (diff) | |
| download | afl++-34d7a6357ed7bab5a934fdaf2622c72ad27c8f28.tar.gz | |
Merge pull request #1347 from WorksButNotTested/cache
Add global caching of block translation to instrumentation
Diffstat (limited to 'frida_mode/ts/lib/afl.ts')
| -rw-r--r-- | frida_mode/ts/lib/afl.ts | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/frida_mode/ts/lib/afl.ts b/frida_mode/ts/lib/afl.ts index 7999b661..a858f074 100644 --- a/frida_mode/ts/lib/afl.ts +++ b/frida_mode/ts/lib/afl.ts @@ -85,6 +85,13 @@ class Afl { } /** + * See `AFL_FRIDA_INST_NO_CACHE`. + */ + public static setCacheDisable(): void { + Afl.jsApiSetCacheDisable(); + } + + /** * See `AFL_FRIDA_DEBUG_MAPS`. */ public static setDebugMaps(): void { @@ -111,6 +118,14 @@ class Afl { } /** + * See `AFL_FRIDA_INST_CACHE_SIZE`. This function takes a single `number` + * as an argument. + */ + public static setInstrumentCacheSize(size: number): void { + Afl.jsApiSetInstrumentCacheSize(size); + } + + /** * See `AFL_FRIDA_INST_COVERAGE_FILE`. This function takes a single `string` * as an argument. */ @@ -354,6 +369,11 @@ class Afl { "void", []); + private static readonly jsApiSetCacheDisable = Afl.jsApiGetFunction( + "js_api_set_cache_disable", + "void", + []); + private static readonly jsApiSetDebugMaps = Afl.jsApiGetFunction( "js_api_set_debug_maps", "void", @@ -364,6 +384,11 @@ class Afl { "void", ["pointer"]); + private static readonly jsApiSetInstrumentCacheSize = Afl.jsApiGetFunction( + "js_api_set_instrument_cache_size", + "void", + ["size_t"]); + private static readonly jsApiSetInstrumentCoverageFile = Afl.jsApiGetFunction( "js_api_set_instrument_coverage_file", "void", |
