run until end of LLVMFuzzerTestOneInput for collecting coverage
@@ -98,8 +98,14 @@ function dumpCounters(results_dir, should_disable_sympath) {
// Disable FCE from sanitizers.
execute("sxd av");
- // Run to exit break in `ntdll!NtTerminateProcess`.
- execute("g");
+ // Run until `LLVMFuzzerTestOneInput()`.
+ // This makes us unlikely to have unloaded any modules that the user dynamically loaded,
+ // and so we will still be able to dump the coverage tables for those modules.
+ execute("bm *!LLVMFuzzerTestOneInput")
+ execute("g")
+
+ // run until return from this context
+ execute("pt")
let found = false;
host.currentProcess.Modules.All(function (module) {
