mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-12 18:18:08 +00:00
disable sympath unless it's set via target_env (#222)
This commit is contained in:
@ -128,10 +128,13 @@ impl CoverageRecorder {
|
|||||||
.join("libfuzzer-coverage")
|
.join("libfuzzer-coverage")
|
||||||
.join("DumpCounters.js");
|
.join("DumpCounters.js");
|
||||||
|
|
||||||
|
let should_disable_sympath = !self.config.target_env.contains_key("_NT_SYMBOL_PATH");
|
||||||
|
|
||||||
let cdb_cmd = format!(
|
let cdb_cmd = format!(
|
||||||
".scriptload {}; !dumpcounters {:?}; q",
|
".scriptload {}; !dumpcounters {:?}, {}; q",
|
||||||
script_path.to_string_lossy(),
|
script_path.to_string_lossy(),
|
||||||
output.to_string_lossy()
|
output.to_string_lossy(),
|
||||||
|
should_disable_sympath,
|
||||||
);
|
);
|
||||||
|
|
||||||
let mut cmd = Command::new("cdb.exe");
|
let mut cmd = Command::new("cdb.exe");
|
||||||
|
@ -83,7 +83,14 @@ function processModule(module, results_dir) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function dumpCounters(results_dir, sample_name) {
|
function dumpCounters(results_dir, should_disable_sympath) {
|
||||||
|
if (should_disable_sympath == true) {
|
||||||
|
logln(`disabling sympath`);
|
||||||
|
execute('.sympath ""');
|
||||||
|
} else {
|
||||||
|
logln(`not disabling sympath`);
|
||||||
|
}
|
||||||
|
|
||||||
// Reset to initial break in `ntdll!LdrpDoDebuggerBreak`.
|
// Reset to initial break in `ntdll!LdrpDoDebuggerBreak`.
|
||||||
execute(".restart");
|
execute(".restart");
|
||||||
|
|
||||||
@ -95,7 +102,7 @@ function dumpCounters(results_dir, sample_name) {
|
|||||||
|
|
||||||
let found = false;
|
let found = false;
|
||||||
host.currentProcess.Modules.All(function (module) {
|
host.currentProcess.Modules.All(function (module) {
|
||||||
let result = processModule(module, results_dir, sample_name);
|
let result = processModule(module, results_dir);
|
||||||
if (result) {
|
if (result) {
|
||||||
found = true;
|
found = true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user