diff --git a/src/agent/script/win64/libfuzzer-coverage/DumpCounters.js b/src/agent/script/win64/libfuzzer-coverage/DumpCounters.js index ac1eefe1ee..9623f78f40 100644 --- a/src/agent/script/win64/libfuzzer-coverage/DumpCounters.js +++ b/src/agent/script/win64/libfuzzer-coverage/DumpCounters.js @@ -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) {