about summary refs log tree commit diff
path: root/frida_mode/ts/lib/afl.ts
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2021-08-27 08:39:27 +0200
committerGitHub <noreply@github.com>2021-08-27 08:39:27 +0200
commit066f60dd2f1db256d8301755218e4ec69e643163 (patch)
tree6e49c340744e4436c2e6be990c1bd8b91ca13133 /frida_mode/ts/lib/afl.ts
parent31e34c1634e5b5bf43c6c1a8451557fe48da2771 (diff)
parente5f5d5886af5d3fad07c2e64945236258b3aca23 (diff)
downloadafl++-066f60dd2f1db256d8301755218e4ec69e643163.tar.gz
Merge pull request #1078 from WorksButNotTested/unstable-coverage
Add unstable coverage support
Diffstat (limited to 'frida_mode/ts/lib/afl.ts')
-rw-r--r--frida_mode/ts/lib/afl.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/frida_mode/ts/lib/afl.ts b/frida_mode/ts/lib/afl.ts
index d7f8b7bc..c722f558 100644
--- a/frida_mode/ts/lib/afl.ts
+++ b/frida_mode/ts/lib/afl.ts
@@ -164,6 +164,15 @@ class Afl {
   }
 
   /**
+   * See `AFL_FRIDA_INST_UNSTABLE_COVERAGE_FILE`. This function takes a single
+   * `string` as an argument.
+   */
+  public static setInstrumentUnstableCoverageFile(file: string): void {
+    const buf = Memory.allocUtf8String(file);
+    Afl.jsApiSetInstrumentUnstableCoverageFile(buf);
+  }
+
+  /**
    * This is equivalent to setting `AFL_FRIDA_PERSISTENT_ADDR`, again a
    * `NativePointer` should be provided as it's argument.
    */
@@ -338,6 +347,11 @@ class Afl {
     "void",
     []);
 
+  private static readonly jsApiSetInstrumentUnstableCoverageFile = Afl.jsApiGetFunction(
+    "js_api_set_instrument_unstable_coverage_file",
+    "void",
+    ["pointer"]);
+
   private static readonly jsApiSetPersistentAddress = Afl.jsApiGetFunction(
     "js_api_set_persistent_address",
     "void",