From ceabd19bddde4526404778cce892ae876379174a Mon Sep 17 00:00:00 2001 From: Alex Franchuk Date: Wed, 23 Oct 2024 13:58:12 +0000 Subject: [PATCH] Bug 1917685 - Merge minidump-analyzer into the crash reporter client r=gsvelto,fluent-reviewers Differential Revision: https://phabricator.services.mozilla.com/D225234 --- Cargo.lock | 5 +- Cargo.toml | 2 +- browser/app/macbuild/Contents/MacOS-files.in | 3 - browser/installer/package-manifest.in | 6 - browser/installer/windows/nsis/shared.nsh | 1 - python/mozbuild/mozbuild/artifacts.py | 2 - .../hardenedruntime/v2/developer/utility.xml | 3 +- taskcluster/config.yml | 2 - .../components/crashes/CrashService.sys.mjs | 24 +- toolkit/crashreporter/client/app/Cargo.toml | 1 + .../crashreporter/client/app/src/analyze.rs | 37 + .../crashreporter/client/app/src/config.rs | 2 +- toolkit/crashreporter/client/app/src/main.rs | 50 +- toolkit/crashreporter/client/app/src/test.rs | 25 - .../minidump-analyzer/Cargo.lock | 1057 +++++++++++++++++ .../minidump-analyzer/Cargo.toml | 12 +- .../crashreporter/minidump-analyzer/README.md | 6 + .../analyzer-test/Cargo.lock | 662 ----------- .../analyzer-test/Cargo.toml | 16 - .../minidump-analyzer/analyzer-test/README.md | 6 - .../analyzer-test/src/lib.rs | 3 - .../crashreporter/minidump-analyzer/moz.build | 7 - .../minidump-analyzer/src/{main.rs => lib.rs} | 337 +++--- .../minidump-analyzer/src/windows/mod.rs | 2 +- .../{analyzer-test => }/tests/analyze.rs | 19 +- .../{analyzer-test => }/tests/client.rs | 0 toolkit/crashreporter/moz.build | 5 +- .../test/unit/head_crashreporter.js | 19 +- .../crashreporter/test/unit/head_win64cfi.js | 9 +- .../en-US/crashreporter/crashreporter.ftl | 1 - 30 files changed, 1356 insertions(+), 968 deletions(-) create mode 100644 toolkit/crashreporter/client/app/src/analyze.rs create mode 100644 toolkit/crashreporter/minidump-analyzer/Cargo.lock create mode 100644 toolkit/crashreporter/minidump-analyzer/README.md delete mode 100644 toolkit/crashreporter/minidump-analyzer/analyzer-test/Cargo.lock delete mode 100644 toolkit/crashreporter/minidump-analyzer/analyzer-test/Cargo.toml delete mode 100644 toolkit/crashreporter/minidump-analyzer/analyzer-test/README.md delete mode 100644 toolkit/crashreporter/minidump-analyzer/analyzer-test/src/lib.rs delete mode 100644 toolkit/crashreporter/minidump-analyzer/moz.build rename toolkit/crashreporter/minidump-analyzer/src/{main.rs => lib.rs} (61%) rename toolkit/crashreporter/minidump-analyzer/{analyzer-test => }/tests/analyze.rs (89%) rename toolkit/crashreporter/minidump-analyzer/{analyzer-test => }/tests/client.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index 77d213497e0d..3a526cfcabf4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1104,6 +1104,7 @@ dependencies = [ "libloading", "lmdb-rkv-sys", "log", + "minidump-analyzer", "mozbuild", "mozilla-central-workspace-hack", "objc", @@ -3871,15 +3872,12 @@ dependencies = [ "anyhow", "async-trait", "breakpad-symbols", - "clap", - "env_logger", "futures-executor", "futures-util", "lazy_static", "log", "minidump", "minidump-unwind", - "mozilla-central-workspace-hack", "serde_json", "windows-sys", ] @@ -4070,7 +4068,6 @@ dependencies = [ "futures", "futures-channel", "futures-core", - "futures-executor", "futures-sink", "futures-util", "getrandom", diff --git a/Cargo.toml b/Cargo.toml index 4d2325f0f5db..b3cdabd8d151 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,6 @@ members = [ "testing/geckodriver", "toolkit/components/uniffi-bindgen-gecko-js", "toolkit/crashreporter/client/app", - "toolkit/crashreporter/minidump-analyzer", "toolkit/crashreporter/mozwer-rust", "toolkit/crashreporter/rust_minidump_writer_linux", "toolkit/library/gtest/rust", @@ -41,6 +40,7 @@ exclude = [ "media/mp4parse-rust/mp4parse", "media/mp4parse-rust/mp4parse_capi", "xpcom/rust/gkrust_utils", + "toolkit/crashreporter/minidump-analyzer", "tools/lint/test/files/clippy", "tools/fuzzing/rust", "dom/base/rust", diff --git a/browser/app/macbuild/Contents/MacOS-files.in b/browser/app/macbuild/Contents/MacOS-files.in index f43118ba8879..7517c5b42ac7 100644 --- a/browser/app/macbuild/Contents/MacOS-files.in +++ b/browser/app/macbuild/Contents/MacOS-files.in @@ -13,9 +13,6 @@ #if defined(MOZ_ASAN) || defined(MOZ_TSAN) || defined(FUZZING) /llvm-symbolizer #endif -#if defined(MOZ_CRASHREPORTER) -/minidump-analyzer -#endif /nmhproxy /pingsender /pk12util diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in index 8aa6bf65634b..861ba1c484a4 100644 --- a/browser/installer/package-manifest.in +++ b/browser/installer/package-manifest.in @@ -401,12 +401,6 @@ bin/libfreebl_64int_3.so #endif #endif -; [ minidump-analyzer ] -; -#ifdef MOZ_CRASHREPORTER -@BINPATH@/minidump-analyzer@BIN_SUFFIX@ -#endif - ; [ Ping Sender ] ; @BINPATH@/pingsender@BIN_SUFFIX@ diff --git a/browser/installer/windows/nsis/shared.nsh b/browser/installer/windows/nsis/shared.nsh index 35e83936e827..32b4ff55860c 100755 --- a/browser/installer/windows/nsis/shared.nsh +++ b/browser/installer/windows/nsis/shared.nsh @@ -1579,7 +1579,6 @@ ${RemoveDefaultBrowserAgentShortcut} Push "xpcom.dll" Push "crashreporter.exe" Push "default-browser-agent.exe" - Push "minidump-analyzer.exe" Push "nmhproxy.exe" Push "pingsender.exe" Push "updater.exe" diff --git a/python/mozbuild/mozbuild/artifacts.py b/python/mozbuild/mozbuild/artifacts.py index 6e46664f2040..5eb30f7c7edc 100644 --- a/python/mozbuild/mozbuild/artifacts.py +++ b/python/mozbuild/mozbuild/artifacts.py @@ -560,7 +560,6 @@ class LinuxArtifactJob(ArtifactJob): "{product}/dependentlibs.list", "{product}/{product}", "{product}/{product}-bin", - "{product}/minidump-analyzer", "{product}/pingsender", "{product}/plugin-container", "{product}/updater", @@ -659,7 +658,6 @@ class MacArtifactJob(ArtifactJob): "{product}", "{product}-bin", "*.dylib", - "minidump-analyzer", "nmhproxy", "pingsender", "plugin-container.app/Contents/MacOS/plugin-container", diff --git a/security/mac/hardenedruntime/v2/developer/utility.xml b/security/mac/hardenedruntime/v2/developer/utility.xml index 3c4f73e80bbc..305323e42a12 100644 --- a/security/mac/hardenedruntime/v2/developer/utility.xml +++ b/security/mac/hardenedruntime/v2/developer/utility.xml @@ -2,8 +2,7 @@ diff --git a/taskcluster/config.yml b/taskcluster/config.yml index 158d89b83b11..c501bda8db5e 100644 --- a/taskcluster/config.yml +++ b/taskcluster/config.yml @@ -1067,7 +1067,6 @@ mac-signing: - "/Contents/Library/LaunchServices/org.mozilla.updater" - "/Contents/MacOS/XUL" - "/Contents/MacOS/pingsender" - - "/Contents/MacOS/minidump-analyzer" - "/Contents/MacOS/nmhproxy" - "/Contents/MacOS/*.dylib" - "/Contents/Resources/gmp-clearkey/*/*.dylib" @@ -1111,7 +1110,6 @@ mac-signing: - "/Contents/MacOS/updater.app" - "/Contents/Library/LaunchServices/org.mozilla.updater" - "/Contents/MacOS/pingsender" - - "/Contents/MacOS/minidump-analyzer" - "/Contents/MacOS/nmhproxy" - "/Contents/Frameworks/ChannelPrefs.framework" diff --git a/toolkit/components/crashes/CrashService.sys.mjs b/toolkit/components/crashes/CrashService.sys.mjs index 3634327b2e66..40eecbe585d0 100644 --- a/toolkit/components/crashes/CrashService.sys.mjs +++ b/toolkit/components/crashes/CrashService.sys.mjs @@ -8,7 +8,8 @@ import { AsyncShutdown } from "resource://gre/modules/AsyncShutdown.sys.mjs"; // Set to true if the application is quitting var gQuitting = false; -// Tracks all the running instances of the minidump-analyzer +// Tracks all the running instances of the crash reporter client (for minidump +// analysis). var gRunningProcesses = new Set(); /** @@ -29,19 +30,24 @@ async function maybeRunMinidumpAnalyzer(minidumpPath, allThreads) { ); } -function getMinidumpAnalyzerPath() { +function getCrashReporterPath() { + const binPrefix = + AppConstants.platform === "macosx" + ? "crashreporter.app/Contents/MacOS/" + : ""; const binSuffix = AppConstants.platform === "win" ? ".exe" : ""; - const exeName = "minidump-analyzer" + binSuffix; + const exeName = binPrefix + "crashreporter" + binSuffix; let exe = Services.dirsvc.get("GreBinD", Ci.nsIFile); - exe.append(exeName); + exe.appendRelativePath(exeName); return exe; } /** - * Run the minidump analyzer tool to gather stack traces from the minidump. The - * stack traces will be stored in the .extra file under the StackTraces= entry. + * Run the crash reporter's analyzer tool to gather stack traces from the + * minidump. The stack traces will be stored in the .extra file under the + * StackTraces= entry. * * @param minidumpPath {string} The path to the minidump file * @param allThreads {bool} Gather stack traces for all threads, not just the @@ -53,8 +59,8 @@ function getMinidumpAnalyzerPath() { function runMinidumpAnalyzer(minidumpPath, allThreads) { return new Promise((resolve, reject) => { try { - let exe = getMinidumpAnalyzerPath(); - let args = [minidumpPath]; + let exe = getCrashReporterPath(); + let args = ["--analyze", minidumpPath]; let process = Cc["@mozilla.org/process/util;1"].createInstance( Ci.nsIProcess ); @@ -63,7 +69,7 @@ function runMinidumpAnalyzer(minidumpPath, allThreads) { process.noShell = true; if (allThreads) { - args.unshift("--full"); + args.push("--full"); } process.runAsync(args, args.length, (subject, topic) => { diff --git a/toolkit/crashreporter/client/app/Cargo.toml b/toolkit/crashreporter/client/app/Cargo.toml index c22e785e2ca1..e4a8b3e39bf4 100644 --- a/toolkit/crashreporter/client/app/Cargo.toml +++ b/toolkit/crashreporter/client/app/Cargo.toml @@ -16,6 +16,7 @@ glean = { workspace = true } intl-memoizer = "0.5" libloading = "0.8" log = "0.4.17" +minidump-analyzer = { path = "../../minidump-analyzer" } mozbuild = "0.1" mozilla-central-workspace-hack = { version = "0.1", features = ["crashreporter"], optional = true } once_cell = "1" diff --git a/toolkit/crashreporter/client/app/src/analyze.rs b/toolkit/crashreporter/client/app/src/analyze.rs new file mode 100644 index 000000000000..b0c3ccc10e49 --- /dev/null +++ b/toolkit/crashreporter/client/app/src/analyze.rs @@ -0,0 +1,37 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ + +//! A frontend for minidump analysis. + +use minidump_analyzer::MinidumpAnalyzer; + +pub fn main() { + // Skip program name and `--analyze` argument. + let mut args = std::env::args_os().skip(2); + + let mut minidump_path = None; + let mut analyze_all_threads = false; + while let Some(arg) = args.next() { + if arg == "--full" && !analyze_all_threads { + analyze_all_threads = true; + } else if minidump_path.is_none() { + minidump_path = Some(arg); + } else { + eprintln!("ignoring extraneous argument: {}", arg.to_string_lossy()); + } + } + + let Some(minidump_path) = minidump_path else { + eprintln!("expected minidump path to analyze"); + std::process::exit(1); + }; + + if let Err(e) = MinidumpAnalyzer::new(minidump_path.as_ref()) + .all_threads(analyze_all_threads) + .analyze() + { + eprintln!("minidump analyzer failed: {e}"); + std::process::exit(1); + } +} diff --git a/toolkit/crashreporter/client/app/src/config.rs b/toolkit/crashreporter/client/app/src/config.rs index b78a1f1fcc18..accfc36642b8 100644 --- a/toolkit/crashreporter/client/app/src/config.rs +++ b/toolkit/crashreporter/client/app/src/config.rs @@ -104,7 +104,7 @@ impl Config { ) } - // We no longer use don't use `MOZ_CRASHREPORTER_RESTART_ARG_0`, see bug 1872920. + // We no longer use `MOZ_CRASHREPORTER_RESTART_ARG_0`, see bug 1872920. self.restart_args = (1..) .into_iter() .map_while(|arg_num| std::env::var_os(format!("{}_{}", ekey!("RESTART_ARG"), arg_num))) diff --git a/toolkit/crashreporter/client/app/src/main.rs b/toolkit/crashreporter/client/app/src/main.rs index b1053c95bef5..b16f3a68cfd9 100644 --- a/toolkit/crashreporter/client/app/src/main.rs +++ b/toolkit/crashreporter/client/app/src/main.rs @@ -33,7 +33,6 @@ #![cfg_attr(windows, windows_subsystem = "windows")] use crate::std::sync::Arc; -use anyhow::Context; use config::Config; // A few macros are defined here to allow use in all submodules via textual scope lookup. @@ -58,6 +57,7 @@ macro_rules! ekey { }; } +mod analyze; mod async_task; mod config; mod data; @@ -75,8 +75,22 @@ mod ui; #[cfg(test)] mod test; -#[cfg(not(mock))] fn main() { + // Determine the mode in which to run. This is very simplistic, but need not be more permissive + // nor flexible since we control how the program is invoked. + if std::env::args_os() + .nth(1) + .map(|s| s == "--analyze") + .unwrap_or(false) + { + analyze::main() + } else { + report_main() + } +} + +#[cfg(not(mock))] +fn report_main() { let log_target = logging::init(); let mut config = Config::new(); @@ -106,7 +120,7 @@ fn main() { } #[cfg(mock)] -fn main() { +fn report_main() { // TODO it'd be nice to be able to set these values at runtime in some way when running the // mock application. @@ -151,10 +165,6 @@ fn main() { // Create a default mock environment which allows successful operation. let mut mock = mock::builder(); mock.set( - Command::mock("work_dir/minidump-analyzer"), - Box::new(|_| Ok(crate::std::process::success_output())), - ) - .set( Command::mock("work_dir/pingsender"), Box::new(|_| Ok(crate::std::process::success_output())), ) @@ -212,24 +222,16 @@ fn try_run(config: &mut Arc) -> anyhow::Result { Ok(false) } } else { - // Run minidump-analyzer to gather stack traces. + // Use minidump-analyzer to gather stack traces. + #[cfg(not(mock))] { - let analyzer_path = config.installation_program_path("minidump-analyzer"); - let mut cmd = crate::process::background_command(&analyzer_path); - if config.dump_all_threads { - cmd.arg("--full"); - } - cmd.arg(config.dump_file()); - let output = cmd - .output() - .with_context(|| config.string("crashreporter-error-minidump-analyzer"))?; - if !output.status.success() { - log::warn!( - "minidump-analyzer failed to run ({});\n\nstderr: {}\n\nstdout: {}", - output.status, - String::from_utf8_lossy(&output.stderr), - String::from_utf8_lossy(&output.stdout), - ); + if let Err(e) = minidump_analyzer::MinidumpAnalyzer::new(config.dump_file()) + .all_threads(config.dump_all_threads) + .analyze() + { + // Minidump analysis gives optional additional information; if it fails, we should + // still proceed. + log::warn!("minidump analyzer failed: {e}"); } } diff --git a/toolkit/crashreporter/client/app/src/test.rs b/toolkit/crashreporter/client/app/src/test.rs index cd8e9b18c1f6..9343e7630a4a 100644 --- a/toolkit/crashreporter/client/app/src/test.rs +++ b/toolkit/crashreporter/client/app/src/test.rs @@ -192,10 +192,6 @@ impl GuiTest { // Create a default mock environment which allows successful operation. let mut mock = mock::builder(); mock.set( - Command::mock("work_dir/minidump-analyzer"), - Box::new(|_| Ok(crate::std::process::success_output())), - ) - .set( Command::mock("work_dir/pingsender"), Box::new(|_| Ok(crate::std::process::success_output())), ) @@ -451,30 +447,9 @@ fn no_dump_file() { assert!(try_run(&mut cfg).is_ok()); } -#[test] -fn minidump_analyzer_error() { - mock::builder() - .set( - Command::mock("work_dir/minidump-analyzer"), - Box::new(|_| Err(ErrorKind::NotFound.into())), - ) - .set( - crate::std::env::MockCurrentExe, - "work_dir/crashreporter".into(), - ) - .run(|| { - let cfg = test_config(); - assert!(try_run(&mut Arc::new(cfg)).is_err()); - }); -} - #[test] fn no_extra_file() { mock::builder() - .set( - Command::mock("work_dir/minidump-analyzer"), - Box::new(|_| Ok(crate::std::process::success_output())), - ) .set( crate::std::env::MockCurrentExe, "work_dir/crashreporter".into(), diff --git a/toolkit/crashreporter/minidump-analyzer/Cargo.lock b/toolkit/crashreporter/minidump-analyzer/Cargo.lock new file mode 100644 index 000000000000..a582214292e7 --- /dev/null +++ b/toolkit/crashreporter/minidump-analyzer/Cargo.lock @@ -0,0 +1,1057 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "anyhow" +version = "1.0.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" + +[[package]] +name = "arrayvec" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" + +[[package]] +name = "async-trait" +version = "0.1.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "autocfg" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" + +[[package]] +name = "bitflags" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" + +[[package]] +name = "breakpad-symbols" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6aeaa2a7f839cbb61c2f59ad6e51cc3fd2c24aa2103cb24e6be143bcc114aa24" +dependencies = [ + "async-trait", + "cachemap2", + "circular", + "debugid", + "futures-util", + "minidump-common 0.22.1", + "nom", + "range-map", + "thiserror", + "tracing", +] + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "cachemap2" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68ccbd3153aa153b2f5eff557537ffce81e4dd6c50ae0eddc41dc8d0c388436f" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "cfg_aliases" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" + +[[package]] +name = "circular" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fc239e0f6cb375d2402d48afb92f76f5404fd1df208a41930ec81eda078bea" + +[[package]] +name = "concurrent-queue" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crash-context" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "031ed29858d90cfdf27fe49fae28028a1f20466db97962fa2f4ea34809aeebf3" +dependencies = [ + "cfg-if", + "libc", + "mach2", +] + +[[package]] +name = "crash-handler" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff62668cee357a18a67b5ce55bdef533d2c108d8eded362408f08face8731a71" +dependencies = [ + "cfg-if", + "crash-context", + "libc", + "mach2", + "parking_lot", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" + +[[package]] +name = "debugid" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef552e6f588e446098f6ba40d89ac146c8c7b64aade83c051ee00bb5d2bc18d" +dependencies = [ + "uuid", +] + +[[package]] +name = "deranged" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +dependencies = [ + "powerfmt", +] + +[[package]] +name = "encoding_rs" +version = "0.8.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "errno" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "fallible-iterator" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" + +[[package]] +name = "fastrand" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" + +[[package]] +name = "framehop" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fd28d2036d4fd99e3629487baca659e5af1c5d554e320168613be79028610fc" +dependencies = [ + "arrayvec", + "cfg-if", + "fallible-iterator", + "gimli", + "macho-unwind-info", + "pe-unwind-info", +] + +[[package]] +name = "futures-channel" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +dependencies = [ + "futures-core", +] + +[[package]] +name = "futures-core" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" + +[[package]] +name = "futures-executor" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", + "num_cpus", +] + +[[package]] +name = "futures-macro" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "futures-task" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" + +[[package]] +name = "futures-util" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +dependencies = [ + "futures-channel", + "futures-core", + "futures-macro", + "futures-task", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "gimli" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2e1d97fbe9722ba9bbd0c97051c2956e726562b61f86a25a4360398a40edfc9" +dependencies = [ + "fallible-iterator", + "stable_deref_trait", +] + +[[package]] +name = "goblin" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b363a30c165f666402fe6a3024d3bec7ebc898f96a4a23bd1c99f8dbf3f4f47" +dependencies = [ + "log", + "plain", + "scroll", +] + +[[package]] +name = "hermit-abi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" + +[[package]] +name = "hermit-abi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "itoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" + +[[package]] +name = "json" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "078e285eafdfb6c4b434e0d31e8cfcb5115b651496faca5749b88fafd4f23bfd" + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[package]] +name = "libc" +version = "0.2.159" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" + +[[package]] +name = "linux-raw-sys" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" + +[[package]] +name = "lock_api" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" + +[[package]] +name = "mach2" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b955cdeb2a02b9117f121ce63aa52d08ade45de53e48fe6a38b39c10f6f709" +dependencies = [ + "libc", +] + +[[package]] +name = "macho-unwind-info" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b6086acc74bc23f56b60e88bb082d505e23849d68d6c0f12bb6a7ad5c60e03e" +dependencies = [ + "thiserror", + "zerocopy", + "zerocopy-derive", +] + +[[package]] +name = "memchr" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" + +[[package]] +name = "memmap2" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd3f7eed9d3848f8b98834af67102b720745c4ec028fcd0aa0239277e7de374f" +dependencies = [ + "libc", +] + +[[package]] +name = "memoffset" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +dependencies = [ + "autocfg", +] + +[[package]] +name = "minidump" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cee91aa51259518a08a12c18b5754e45135f89f1d9d7d6aae76ce93b92686698" +dependencies = [ + "debugid", + "encoding_rs", + "memmap2", + "minidump-common 0.22.1", + "num-traits", + "procfs-core", + "range-map", + "scroll", + "thiserror", + "time", + "tracing", + "uuid", +] + +[[package]] +name = "minidump-analyzer" +version = "0.1.0" +dependencies = [ + "anyhow", + "async-trait", + "breakpad-symbols", + "crash-handler", + "futures-executor", + "futures-util", + "json", + "lazy_static", + "log", + "minidump", + "minidump-unwind", + "minidumper", + "sadness-generator", + "serde_json", + "tempfile", + "windows-sys 0.52.0", +] + +[[package]] +name = "minidump-common" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c4d14bcca0fd3ed165a03000480aaa364c6860c34e900cb2dafdf3b95340e77" +dependencies = [ + "bitflags", + "debugid", + "num-derive", + "num-traits", + "range-map", + "scroll", + "smart-default", +] + +[[package]] +name = "minidump-common" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cd8a9fb054833d2f402e82e256aeef544e595e45fe8fca2de6d03ed605f6647" +dependencies = [ + "bitflags", + "debugid", + "num-derive", + "num-traits", + "range-map", + "scroll", + "smart-default", +] + +[[package]] +name = "minidump-unwind" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efde3c09258c297c0f6761f04d97771ef82a59a6734e7ba0e6e2ef961fb3cbb3" +dependencies = [ + "async-trait", + "breakpad-symbols", + "cachemap2", + "framehop", + "memmap2", + "minidump", + "minidump-common 0.22.1", + "object", + "scroll", + "tracing", +] + +[[package]] +name = "minidump-writer" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abcd9c8a1e6e1e9d56ce3627851f39a17ea83e17c96bc510f29d7e43d78a7d" +dependencies = [ + "bitflags", + "byteorder", + "cfg-if", + "crash-context", + "goblin", + "libc", + "log", + "mach2", + "memmap2", + "memoffset", + "minidump-common 0.21.2", + "nix", + "procfs-core", + "scroll", + "tempfile", + "thiserror", +] + +[[package]] +name = "minidumper" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4ebc9d1f8847ec1d078f78b35ed598e0ebefa1f242d5f83cd8d7f03960a7d1" +dependencies = [ + "cfg-if", + "crash-context", + "libc", + "log", + "minidump-writer", + "parking_lot", + "polling", + "scroll", + "thiserror", + "uds", +] + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "nix" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" +dependencies = [ + "bitflags", + "cfg-if", + "cfg_aliases", + "libc", +] + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] +name = "num-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi 0.3.9", + "libc", +] + +[[package]] +name = "object" +version = "0.36.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" + +[[package]] +name = "parking_lot" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets", +] + +[[package]] +name = "pe-unwind-info" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ec3b43050c38ffb9de87e17d874e9956e3a9131b343c9b7b7002597727c3891" +dependencies = [ + "arrayvec", + "bitflags", + "thiserror", + "zerocopy", + "zerocopy-derive", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "plain" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" + +[[package]] +name = "polling" +version = "3.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc2790cd301dec6cd3b7a025e4815cf825724a51c98dccfe6a3e55f05ffb6511" +dependencies = [ + "cfg-if", + "concurrent-queue", + "hermit-abi 0.4.0", + "pin-project-lite", + "rustix", + "tracing", + "windows-sys 0.59.0", +] + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "proc-macro2" +version = "1.0.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3e4daa0dcf6feba26f985457cdf104d4b4256fc5a09547140f3631bb076b19a" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "procfs-core" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d3554923a69f4ce04c4a754260c338f505ce22642d3830e049a399fc2059a29" +dependencies = [ + "bitflags", + "hex", +] + +[[package]] +name = "quote" +version = "1.0.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "range-map" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12a5a2d6c7039059af621472a4389be1215a816df61aa4d531cfe85264aee95f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "redox_syscall" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" +dependencies = [ + "bitflags", +] + +[[package]] +name = "rustix" +version = "0.38.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + +[[package]] +name = "ryu" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" + +[[package]] +name = "sadness-generator" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cdaf5eed5d14ebb5d32d864b419e760c9ddf123bcde880a30a90063494592d7" +dependencies = [ + "libc", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "scroll" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ab8598aa408498679922eff7fa985c25d58a90771bd6be794434c5277eab1a6" +dependencies = [ + "scroll_derive", +] + +[[package]] +name = "scroll_derive" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f81c2fde025af7e69b1d1420531c8a8811ca898919db177141a85313b1cb932" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde" +version = "1.0.210" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.210" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.128" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" +dependencies = [ + "itoa", + "memchr", + "ryu", + "serde", +] + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "smart-default" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eb01866308440fc64d6c44d9e86c5cc17adfe33c4d6eed55da9145044d0ffc1" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "syn" +version = "2.0.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "tempfile" +version = "3.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" +dependencies = [ + "cfg-if", + "fastrand", + "once_cell", + "rustix", + "windows-sys 0.59.0", +] + +[[package]] +name = "thiserror" +version = "1.0.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "time" +version = "0.3.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +dependencies = [ + "deranged", + "itoa", + "num-conv", + "powerfmt", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" + +[[package]] +name = "time-macros" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +dependencies = [ + "once_cell", +] + +[[package]] +name = "uds" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "885c31f06fce836457fe3ef09a59f83fe8db95d270b11cd78f40a4666c4d1661" +dependencies = [ + "libc", +] + +[[package]] +name = "unicode-ident" +version = "1.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" + +[[package]] +name = "uuid" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "zerocopy" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "byteorder", + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] diff --git a/toolkit/crashreporter/minidump-analyzer/Cargo.toml b/toolkit/crashreporter/minidump-analyzer/Cargo.toml index eff4a44d30cb..d791d4a0ab4a 100644 --- a/toolkit/crashreporter/minidump-analyzer/Cargo.toml +++ b/toolkit/crashreporter/minidump-analyzer/Cargo.toml @@ -7,15 +7,10 @@ readme = "README.md" license = "MPL-2.0" edition = "2021" -[[bin]] -name = "minidump-analyzer" - [dependencies] anyhow = "1.0.69" async-trait = "0.1" breakpad-symbols = "0.22" -clap = { version = "4", default-features = false, features = ["std", "cargo", "wrap_help", "derive"] } -env_logger = { version = "0.10.0", default-features = false } futures-executor = { version = "0.3", features = ["thread-pool"] } futures-util = { version = "0.3", features = ["channel"] } lazy_static = "1.4.0" @@ -35,3 +30,10 @@ features = [ "Win32_Storage_FileSystem", "Win32_UI_WindowsAndMessaging", ] + +[dev-dependencies] +crash-handler = "0.6" +minidumper = "0.8" +json = "0.12.4" +sadness-generator = "0.5.0" +tempfile = "3.3.0" diff --git a/toolkit/crashreporter/minidump-analyzer/README.md b/toolkit/crashreporter/minidump-analyzer/README.md new file mode 100644 index 000000000000..3e818f8f30f4 --- /dev/null +++ b/toolkit/crashreporter/minidump-analyzer/README.md @@ -0,0 +1,6 @@ +# Testing +To run tests, comment out the `mozilla-central-workspace-hack` dependency, then run `cargo test`. +Otherwise, the dependency won't have the feature we need enabled. This is because the crate is +excluded from the workspace (as we don't want to vendor the dev-dependencies). + +The `Cargo.lock` in this directory corresponds to this configuration. diff --git a/toolkit/crashreporter/minidump-analyzer/analyzer-test/Cargo.lock b/toolkit/crashreporter/minidump-analyzer/analyzer-test/Cargo.lock deleted file mode 100644 index 731a8f15e729..000000000000 --- a/toolkit/crashreporter/minidump-analyzer/analyzer-test/Cargo.lock +++ /dev/null @@ -1,662 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" - -[[package]] -name = "byteorder" -version = "1.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "cfg_aliases" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" - -[[package]] -name = "concurrent-queue" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62ec6771ecfa0762d24683ee5a32ad78487a3d3afdc0fb8cae19d2c5deb50b7c" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crash-context" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b85cef661eeca0c6675116310936972c520ebb0a33ddef16fd7efc957f4c1288" -dependencies = [ - "cfg-if", - "libc", - "mach2", -] - -[[package]] -name = "crash-handler" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed56890cb467e9ff5e6fe95254571beebb301990b5c7df5e97a7b203e4f0c4f0" -dependencies = [ - "cfg-if", - "crash-context", - "libc", - "mach2", - "parking_lot", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "debugid" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef552e6f588e446098f6ba40d89ac146c8c7b64aade83c051ee00bb5d2bc18d" -dependencies = [ - "uuid", -] - -[[package]] -name = "errno" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" -dependencies = [ - "libc", - "windows-sys", -] - -[[package]] -name = "fastrand" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" - -[[package]] -name = "goblin" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b363a30c165f666402fe6a3024d3bec7ebc898f96a4a23bd1c99f8dbf3f4f47" -dependencies = [ - "log", - "plain", - "scroll", -] - -[[package]] -name = "hermit-abi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - -[[package]] -name = "json" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "078e285eafdfb6c4b434e0d31e8cfcb5115b651496faca5749b88fafd4f23bfd" - -[[package]] -name = "libc" -version = "0.2.155" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" - -[[package]] -name = "linux-raw-sys" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" - -[[package]] -name = "lock_api" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" -dependencies = [ - "autocfg", - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" - -[[package]] -name = "mach2" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d0d1830bcd151a6fc4aea1369af235b36c1528fe976b8ff678683c9995eade8" -dependencies = [ - "libc", -] - -[[package]] -name = "memmap2" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe751422e4a8caa417e13c3ea66452215d7d63e19e604f4980461212f3ae1322" -dependencies = [ - "libc", -] - -[[package]] -name = "memoffset" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" -dependencies = [ - "autocfg", -] - -[[package]] -name = "minidump-analyzer-test" -version = "0.1.0" -dependencies = [ - "crash-handler", - "json", - "minidumper", - "sadness-generator", - "tempfile", -] - -[[package]] -name = "minidump-common" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bb6eaf88cc770fa58e6ae721cf2e40c2ca6a4c942ae8c7aa324d680bd3c6717" -dependencies = [ - "bitflags 2.5.0", - "debugid", - "num-derive", - "num-traits", - "range-map", - "scroll", - "smart-default", -] - -[[package]] -name = "minidump-writer" -version = "0.8.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abcd9c8a1e6e1e9d56ce3627851f39a17ea83e17c96bc510f29d7e43d78a7d" -dependencies = [ - "bitflags 2.5.0", - "byteorder", - "cfg-if", - "crash-context", - "goblin", - "libc", - "log", - "mach2", - "memmap2", - "memoffset", - "minidump-common", - "nix", - "procfs-core", - "scroll", - "tempfile", - "thiserror", -] - -[[package]] -name = "minidumper" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b99697a8483221ca2d163aedcbee44f3851c4f5916ab0e96ae6397fb6b6deb2" -dependencies = [ - "cfg-if", - "crash-context", - "libc", - "log", - "minidump-writer", - "parking_lot", - "polling", - "scroll", - "thiserror", - "uds", -] - -[[package]] -name = "nix" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" -dependencies = [ - "bitflags 2.5.0", - "cfg-if", - "cfg_aliases", - "libc", -] - -[[package]] -name = "num-derive" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "num-traits" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" -dependencies = [ - "autocfg", -] - -[[package]] -name = "parking_lot" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-targets 0.48.0", -] - -[[package]] -name = "pin-project-lite" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" - -[[package]] -name = "plain" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" - -[[package]] -name = "polling" -version = "3.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645493cf344456ef24219d02a768cf1fb92ddf8c92161679ae3d91b91a637be3" -dependencies = [ - "cfg-if", - "concurrent-queue", - "hermit-abi", - "pin-project-lite", - "rustix", - "tracing", - "windows-sys", -] - -[[package]] -name = "proc-macro2" -version = "1.0.60" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "procfs-core" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d3554923a69f4ce04c4a754260c338f505ce22642d3830e049a399fc2059a29" -dependencies = [ - "bitflags 2.5.0", - "hex", -] - -[[package]] -name = "quote" -version = "1.0.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "range-map" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12a5a2d6c7039059af621472a4389be1215a816df61aa4d531cfe85264aee95f" -dependencies = [ - "num-traits", -] - -[[package]] -name = "redox_syscall" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "rustix" -version = "0.38.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" -dependencies = [ - "bitflags 2.5.0", - "errno", - "libc", - "linux-raw-sys", - "windows-sys", -] - -[[package]] -name = "sadness-generator" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cdaf5eed5d14ebb5d32d864b419e760c9ddf123bcde880a30a90063494592d7" -dependencies = [ - "libc", -] - -[[package]] -name = "scopeguard" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" - -[[package]] -name = "scroll" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ab8598aa408498679922eff7fa985c25d58a90771bd6be794434c5277eab1a6" -dependencies = [ - "scroll_derive", -] - -[[package]] -name = "scroll_derive" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f81c2fde025af7e69b1d1420531c8a8811ca898919db177141a85313b1cb932" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "smallvec" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" - -[[package]] -name = "smart-default" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eb01866308440fc64d6c44d9e86c5cc17adfe33c4d6eed55da9145044d0ffc1" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "syn" -version = "2.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "tempfile" -version = "3.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" -dependencies = [ - "cfg-if", - "fastrand", - "rustix", - "windows-sys", -] - -[[package]] -name = "thiserror" -version = "1.0.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "tracing" -version = "0.1.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" -dependencies = [ - "cfg-if", - "pin-project-lite", - "tracing-core", -] - -[[package]] -name = "tracing-core" -version = "0.1.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" - -[[package]] -name = "uds" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "885c31f06fce836457fe3ef09a59f83fe8db95d270b11cd78f40a4666c4d1661" -dependencies = [ - "libc", -] - -[[package]] -name = "unicode-ident" -version = "1.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" - -[[package]] -name = "uuid" -version = "1.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa2982af2eec27de306107c027578ff7f423d65f7250e40ce0fea8f45248b81" - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets 0.52.5", -] - -[[package]] -name = "windows-targets" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" -dependencies = [ - "windows_aarch64_gnullvm 0.48.0", - "windows_aarch64_msvc 0.48.0", - "windows_i686_gnu 0.48.0", - "windows_i686_msvc 0.48.0", - "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm 0.48.0", - "windows_x86_64_msvc 0.48.0", -] - -[[package]] -name = "windows-targets" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" -dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", - "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" diff --git a/toolkit/crashreporter/minidump-analyzer/analyzer-test/Cargo.toml b/toolkit/crashreporter/minidump-analyzer/analyzer-test/Cargo.toml deleted file mode 100644 index e0bba7f6ddcb..000000000000 --- a/toolkit/crashreporter/minidump-analyzer/analyzer-test/Cargo.toml +++ /dev/null @@ -1,16 +0,0 @@ -[package] -name = "minidump-analyzer-test" -description = "Tests minidump-analyzer using crates which we won't vendor." -version = "0.1.0" -authors = ["Alex Franchuk "] -license = "MPL-2.0" -edition = "2018" - -[dev-dependencies] -crash-handler = "0.6" -minidumper = "0.8" -json = "0.12.4" -sadness-generator = "0.5.0" -tempfile = "3.3.0" - -[workspace] diff --git a/toolkit/crashreporter/minidump-analyzer/analyzer-test/README.md b/toolkit/crashreporter/minidump-analyzer/analyzer-test/README.md deleted file mode 100644 index 951ce177eb5a..000000000000 --- a/toolkit/crashreporter/minidump-analyzer/analyzer-test/README.md +++ /dev/null @@ -1,6 +0,0 @@ -To run the tests, execute: - -`MINIDUMP_ANALYZER=/path/to/minidump-analyzer cargo test` - -You likely want to set `MINIDUMP_ANALYZER` to `OBJDIR/dist/bin/minidump-analyzer` after running -`mach build`. diff --git a/toolkit/crashreporter/minidump-analyzer/analyzer-test/src/lib.rs b/toolkit/crashreporter/minidump-analyzer/analyzer-test/src/lib.rs deleted file mode 100644 index daa3e8897c2f..000000000000 --- a/toolkit/crashreporter/minidump-analyzer/analyzer-test/src/lib.rs +++ /dev/null @@ -1,3 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ diff --git a/toolkit/crashreporter/minidump-analyzer/moz.build b/toolkit/crashreporter/minidump-analyzer/moz.build deleted file mode 100644 index 3848b5b15c9e..000000000000 --- a/toolkit/crashreporter/minidump-analyzer/moz.build +++ /dev/null @@ -1,7 +0,0 @@ -# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- -# vim: set filetype=python: -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. - -RUST_PROGRAMS = ["minidump-analyzer"] diff --git a/toolkit/crashreporter/minidump-analyzer/src/main.rs b/toolkit/crashreporter/minidump-analyzer/src/lib.rs similarity index 61% rename from toolkit/crashreporter/minidump-analyzer/src/main.rs rename to toolkit/crashreporter/minidump-analyzer/src/lib.rs index 8526dca3d3d9..2cc2796f64d7 100644 --- a/toolkit/crashreporter/minidump-analyzer/src/main.rs +++ b/toolkit/crashreporter/minidump-analyzer/src/lib.rs @@ -3,7 +3,6 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use anyhow::Context; -use clap::Parser; use futures_executor::{block_on, ThreadPool}; use minidump::{ system_info::Cpu, Minidump, MinidumpException, MinidumpMemoryList, MinidumpMiscInfo, @@ -14,10 +13,11 @@ use minidump_unwind::{ symbols::debuginfo::DebugInfoSymbolProvider, symbols::SymbolProvider, walk_stack, CallStack, CallStackInfo, SystemInfo, }; +use std::borrow::Cow; use std::fmt::Debug; use std::fs::File; use std::io::Read; -use std::path::PathBuf; +use std::path::{Path, PathBuf}; use std::sync::Arc; use serde_json::{json, Value as JsonValue}; @@ -26,26 +26,147 @@ use serde_json::{json, Value as JsonValue}; mod windows; /// Analyze a minidump file to augment a corresponding .extra file with stack trace information. -#[derive(Parser, Debug)] -#[clap(version)] -struct Args { - /// Generate all stacks, rather than just those of the crashing thread. - #[clap(long = "full")] +#[derive(Debug)] +pub struct MinidumpAnalyzer<'a> { all_stacks: bool, - - /// The minidump file to analyze. - minidump: PathBuf, + minidump: &'a Path, + extras: Option<&'a Path>, } -impl Args { - /// Get the extra file. - /// - /// This file is derived from the minidump file path. - pub fn extra_file(&self) -> PathBuf { - let mut ret = self.minidump.clone(); - ret.set_extension("extra"); - ret +impl<'a> MinidumpAnalyzer<'a> { + /// Create a new MinidumpAnalyzer for the given minidump file. + pub fn new(minidump: &'a Path) -> Self { + MinidumpAnalyzer { + all_stacks: false, + minidump, + extras: None, + } } + + /// Generate all stacks, rather than just those of the crashing thread. + pub fn all_threads(mut self, value: bool) -> Self { + self.all_stacks = value; + self + } + + /// Set the extras file explicitly, rather than deriving from the minidump path. + pub fn extras_file(mut self, path: &'a Path) -> Self { + self.extras = Some(path); + self + } + + /// Analyze the thread(s) and put stacks in the associated .extra file. + pub fn analyze(self) -> anyhow::Result<()> { + let extra_file = self + .extras + .map(Cow::Borrowed) + .unwrap_or_else(|| Cow::Owned(extra_path_from_minidump(&self.minidump))); + let extra_file = extra_file.as_ref(); + + log::info!("minidump file path: {}", self.minidump.display()); + log::info!("extra file path: {}", extra_file.display()); + + let minidump = Minidump::read_path(&self.minidump).context("while reading minidump")?; + + let mut extra_json = parse_extra_file(extra_file)?; + + let proc = processor::Processor::new(&minidump)?; + + let (crashing_thread_idx, call_stacks) = proc.get_call_stacks(self.all_stacks)?; + let crash_type = proc.crash_reason(); + let crash_address = proc.crash_address(); + let used_modules = get_used_modules(&call_stacks, proc.main_module()); + + // Set the `StackTraces` field in the extra JSON data. + extra_json["StackTraces"] = json!({ + "status": call_stack_status(&call_stacks), + "crash_info": { + "type": crash_type, + "address": format!("{crash_address:#x}"), + "crashing_thread": crashing_thread_idx + // TODO: "assertion" when there's no crash indicator + }, + "main_module": proc.main_module().and_then(|m| module_index(&used_modules, m)), + "modules": used_modules.iter().map(|module| { + let code_file = module.code_file(); + let code_file_path: &std::path::Path = code_file.as_ref().as_ref(); + json!({ + "base_addr": format!("{:#x}", module.base_address()), + "end_addr": format!("{:#x}", module.base_address() + module.size()), + "filename": code_file_path.file_name().map(|s| s.to_string_lossy()), + "code_id": module.code_identifier().as_ref().map(|id| id.as_str()), + "debug_file": module.debug_file().as_deref(), + "debug_id": module.debug_identifier().map(|debug| debug.breakpad().to_string()), + "version": module.version().as_deref() + }) + }).collect::>(), + "unloaded_modules": proc.unloaded_modules().map(|module| { + let code_file = module.code_file(); + let code_file_path: &std::path::Path = code_file.as_ref().as_ref(); + json!({ + "base_addr": format!("{:#x}", module.base_address()), + "end_addr": format!("{:#x}", module.base_address() + module.size()), + "filename": code_file_path.file_name().map(|s| s.to_string_lossy()), + "code_id": module.code_identifier().as_ref().map(|id| id.as_str()), + }) + }).collect::>(), + "threads": call_stacks.iter().map(|call_stack| call_stack_to_json(call_stack, &used_modules)).collect::>() + }); + + // StackTraces should not have null values (upstream processing expects the values to be + // omitted). + remove_nulls(&mut extra_json["StackTraces"]); + + let module_signature_info = proc.module_signature_info(); + if !module_signature_info.is_null() { + // ModuleSignatureInfo is sent as a crash annotation so must be string. This differs from + // StackTraces which isn't actually sent (it's just read and removed by the crash + // reporter client). + extra_json["ModuleSignatureInfo"] = serde_json::to_string(&module_signature_info) + .unwrap() + .into(); + } + + std::fs::write(extra_file, extra_json.to_string()) + .context("while writing modified extra file")?; + + Ok(()) + } +} + +fn extra_path_from_minidump(minidump: &Path) -> PathBuf { + let mut ret = minidump.to_owned(); + ret.set_extension("extra"); + ret +} + +/// Parse the extra file (JSON). +fn parse_extra_file(path: &Path) -> anyhow::Result { + let mut extra_file_content = String::new(); + + File::open(path) + .context("while opening extra file")? + .read_to_string(&mut extra_file_content) + .context("while reading extra file")?; + + serde_json::from_str(&extra_file_content).context("while parsing extra file JSON") +} + +/// Get a list of modules used in call stacks, ordered by base address. +fn get_used_modules<'a>( + call_stacks: impl IntoIterator, + main_module: Option<&'a MinidumpModule>, +) -> Vec<&'a MinidumpModule> { + let mut v = call_stacks + .into_iter() + .flat_map(|call_stack| call_stack.frames.iter()) + .filter_map(|frame| frame.module.as_ref()) + // Always include the main module. + .chain(main_module) + .collect::>(); + v.sort_by_key(|m| m.base_address()); + v.dedup_by_key(|m| m.base_address()); + v } mod processor { @@ -61,6 +182,7 @@ mod processor { module_list: MinidumpModuleList, unloaded_module_list: MinidumpUnloadedModuleList, memory_list: UnifiedMemoryList<'a>, + thread_list: MinidumpThreadList<'a>, system_info: MinidumpSystemInfo, processor_system_info: SystemInfo, exception: MinidumpException<'a>, @@ -110,6 +232,7 @@ mod processor { let memory_list = minidump .get_stream::() .unwrap_or_default(); + let thread_list = minidump.get_stream::()?; let exception = minidump.get_stream::()?; // TODO Something like SystemInfo::current() to get the active system's info? @@ -140,6 +263,7 @@ mod processor { module_list, unloaded_module_list, memory_list: UnifiedMemoryList::Memory(memory_list), + thread_list, system_info, processor_system_info, exception, @@ -154,15 +278,25 @@ mod processor { &self.context.system_info } - /// Get the minidump exception. - pub fn exception(&self) -> &MinidumpException { - &self.context.exception + /// Get the crash reason string. + pub fn crash_reason(&self) -> String { + self.context + .exception + .get_crash_reason(self.system_info().os, self.system_info().cpu) + .to_string() + } + + /// Get the crash address. + pub fn crash_address(&self) -> u64 { + self.context + .exception + .get_crash_address(self.system_info().os, self.system_info().cpu) } /// Get call stacks for the given threads. /// /// Call stacks will be concurrently calculated. - pub fn thread_call_stacks<'b>( + fn thread_call_stacks<'b>( &self, threads: impl IntoIterator>, ) -> anyhow::Result> { @@ -176,6 +310,35 @@ mod processor { .collect()) } + /// Get the call stacks to process. + /// + /// The first value in the returned tuple is the crashing thread index. The second value is the + /// set of call stacks to process. + pub fn get_call_stacks(&self, all_stacks: bool) -> anyhow::Result<(usize, Vec)> { + // Derive additional arguments used in stack walking. + let crashing_thread = self + .context + .thread_list + .get_thread(self.context.exception.get_crashing_thread_id()) + .ok_or(anyhow::anyhow!( + "exception thread id missing in thread list" + ))?; + + Ok(if all_stacks { + ( + self.context + .thread_list + .threads + .iter() + .position(|t| t.raw.thread_id == crashing_thread.raw.thread_id) + .expect("get_thread() returned a thread that doesn't exist"), + self.thread_call_stacks(&self.context.thread_list.threads)?, + ) + } else { + (0, self.thread_call_stacks([crashing_thread])?) + }) + } + /// Get all modules, ordered by address. #[cfg(windows)] pub fn ordered_modules(&self) -> impl Iterator { @@ -303,136 +466,6 @@ impl SymbolProvider for BoxedSymbolProvider { } } -use processor::Processor; - -pub fn main() { - env_logger::init(); - - if let Err(e) = try_main() { - eprintln!("{e}"); - std::process::exit(1); - } -} - -fn try_main() -> anyhow::Result<()> { - let args = Args::parse(); - let extra_file = args.extra_file(); - - log::info!("minidump file path: {}", args.minidump.display()); - log::info!("extra file path: {}", extra_file.display()); - - let minidump = Minidump::read_path(&args.minidump).context("while reading minidump")?; - - let mut extra_json: JsonValue = { - let mut extra_file_content = String::new(); - File::open(&extra_file) - .context("while opening extra file")? - .read_to_string(&mut extra_file_content) - .context("while reading extra file")?; - - serde_json::from_str(&extra_file_content).context("while parsing extra file JSON")? - }; - - // Read relevant information from the minidump. - let proc = Processor::new(&minidump)?; - let thread_list = minidump.get_stream::()?; - - // Derive additional arguments used in stack walking. - let crashing_thread = thread_list - .get_thread(proc.exception().get_crashing_thread_id()) - .ok_or(anyhow::anyhow!( - "exception thread id missing in thread list" - ))?; - - let (crashing_thread_idx, call_stacks) = if args.all_stacks { - ( - thread_list - .threads - .iter() - .position(|t| t.raw.thread_id == crashing_thread.raw.thread_id) - .expect("get_thread() returned a thread that doesn't exist"), - proc.thread_call_stacks(&thread_list.threads)?, - ) - } else { - (0, proc.thread_call_stacks([crashing_thread])?) - }; - - let crash_type = proc - .exception() - .get_crash_reason(proc.system_info().os, proc.system_info().cpu) - .to_string(); - let crash_address = proc - .exception() - .get_crash_address(proc.system_info().os, proc.system_info().cpu); - - let used_modules = { - let mut v = call_stacks - .iter() - .flat_map(|call_stack| call_stack.frames.iter()) - .filter_map(|frame| frame.module.as_ref()) - // Always include the main module. - .chain(proc.main_module()) - .collect::>(); - v.sort_by_key(|m| m.base_address()); - v.dedup_by_key(|m| m.base_address()); - v - }; - - extra_json["StackTraces"] = json!({ - "status": call_stack_status(&call_stacks), - "crash_info": { - "type": crash_type, - "address": format!("{crash_address:#x}"), - "crashing_thread": crashing_thread_idx - // TODO: "assertion" when there's no crash indicator - }, - "main_module": proc.main_module().and_then(|m| module_index(&used_modules, m)), - "modules": used_modules.iter().map(|module| { - let code_file = module.code_file(); - let code_file_path: &std::path::Path = code_file.as_ref().as_ref(); - json!({ - "base_addr": format!("{:#x}", module.base_address()), - "end_addr": format!("{:#x}", module.base_address() + module.size()), - "filename": code_file_path.file_name().map(|s| s.to_string_lossy()), - "code_id": module.code_identifier().as_ref().map(|id| id.as_str()), - "debug_file": module.debug_file().as_deref(), - "debug_id": module.debug_identifier().map(|debug| debug.breakpad().to_string()), - "version": module.version().as_deref() - }) - }).collect::>(), - "unloaded_modules": proc.unloaded_modules().map(|module| { - let code_file = module.code_file(); - let code_file_path: &std::path::Path = code_file.as_ref().as_ref(); - json!({ - "base_addr": format!("{:#x}", module.base_address()), - "end_addr": format!("{:#x}", module.base_address() + module.size()), - "filename": code_file_path.file_name().map(|s| s.to_string_lossy()), - "code_id": module.code_identifier().as_ref().map(|id| id.as_str()), - }) - }).collect::>(), - "threads": call_stacks.iter().map(|call_stack| call_stack_to_json(call_stack, &used_modules)).collect::>() - }); - - // StackTraces should not have null values (upstream processing expects the values to be - // omitted). - remove_nulls(&mut extra_json["StackTraces"]); - - let module_signature_info = proc.module_signature_info(); - if !module_signature_info.is_null() { - // ModuleSignatureInfo is sent as a crash annotation so must be string. This differs from - // StackTraces which isn't actually sent (it's just read and removed by the crash - // reporter client). - extra_json["ModuleSignatureInfo"] = serde_json::to_string(&module_signature_info) - .unwrap() - .into(); - } - - std::fs::write(&extra_file, extra_json.to_string()) - .context("while writing modified extra file")?; - - Ok(()) -} - /// Get the index of `needle` in `modules`. fn module_index(modules: &[&MinidumpModule], needle: &MinidumpModule) -> Option { modules diff --git a/toolkit/crashreporter/minidump-analyzer/src/windows/mod.rs b/toolkit/crashreporter/minidump-analyzer/src/windows/mod.rs index b88af7bd7788..147b9ea2d1ca 100644 --- a/toolkit/crashreporter/minidump-analyzer/src/windows/mod.rs +++ b/toolkit/crashreporter/minidump-analyzer/src/windows/mod.rs @@ -17,7 +17,7 @@ use windows_sys::Win32::{ }; // Our windows-targets doesn't link wintrust correctly. -#[link(name = "wintrust", kind = "static")] +#[link(name = "wintrust")] extern "C" {} type DWORD = u32; diff --git a/toolkit/crashreporter/minidump-analyzer/analyzer-test/tests/analyze.rs b/toolkit/crashreporter/minidump-analyzer/tests/analyze.rs similarity index 89% rename from toolkit/crashreporter/minidump-analyzer/analyzer-test/tests/analyze.rs rename to toolkit/crashreporter/minidump-analyzer/tests/analyze.rs index ce3498e34b9d..fc0ecb1ac8e6 100644 --- a/toolkit/crashreporter/minidump-analyzer/analyzer-test/tests/analyze.rs +++ b/toolkit/crashreporter/minidump-analyzer/tests/analyze.rs @@ -2,6 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ +use minidump_analyzer::MinidumpAnalyzer; use std::fs::File; use std::io::{Read, Write}; use std::path::{Path, PathBuf}; @@ -119,10 +120,6 @@ fn analyze_basic_minidump() { let minidump_file = dir.path().join("mini.dump"); let extra_file = dir.path().join("mini.extra"); - let Some(analyzer) = std::env::var_os("MINIDUMP_ANALYZER") else { - panic!("Specify the path to the minidump analyzer binary as the MINIDUMP_ANALYZER environment variable."); - }; - // Create minidump from test. write_minidump(&minidump_file, FailureType::RaiseAbort); @@ -132,19 +129,7 @@ fn analyze_basic_minidump() { write!(&mut extra, "{{}}").expect("failed to write to extra json file"); } - // Run minidump-analyzer - { - let output = Command::new(analyzer) - .env("RUST_BACKTRACE", "1") - .arg(&minidump_file) - .output() - .expect("failed to run minidump-analyzer"); - assert!( - output.status.success(), - "stderr:\n{}", - std::str::from_utf8(&output.stderr).unwrap() - ); - } + MinidumpAnalyzer::new(&minidump_file).analyze().unwrap(); // Check the output JSON // The stack trace will actually be in cargo. It forks and execs the test program; there is no diff --git a/toolkit/crashreporter/minidump-analyzer/analyzer-test/tests/client.rs b/toolkit/crashreporter/minidump-analyzer/tests/client.rs similarity index 100% rename from toolkit/crashreporter/minidump-analyzer/analyzer-test/tests/client.rs rename to toolkit/crashreporter/minidump-analyzer/tests/client.rs diff --git a/toolkit/crashreporter/moz.build b/toolkit/crashreporter/moz.build index 7658ee80ef34..4b2f7f8f9d8e 100644 --- a/toolkit/crashreporter/moz.build +++ b/toolkit/crashreporter/moz.build @@ -64,10 +64,7 @@ if CONFIG["MOZ_CRASHREPORTER"]: DIRS += ["rust_minidump_writer_linux"] if CONFIG["OS_TARGET"] != "Android": - DIRS += [ - "client/app", - "minidump-analyzer", - ] + DIRS += ["client/app"] DIRS += [ "mozannotation_client", diff --git a/toolkit/crashreporter/test/unit/head_crashreporter.js b/toolkit/crashreporter/test/unit/head_crashreporter.js index c37c8acf8c53..e2a67144f665 100644 --- a/toolkit/crashreporter/test/unit/head_crashreporter.js +++ b/toolkit/crashreporter/test/unit/head_crashreporter.js @@ -103,24 +103,25 @@ function getMinidump() { return null; } -function getMinidumpAnalyzerPath() { +function getCrashReporterPath() { + const binPrefix = + AppConstants.platform === "macosx" + ? "crashreporter.app/Contents/MacOS/" + : ""; const binSuffix = AppConstants.platform === "win" ? ".exe" : ""; - const exeName = "minidump-analyzer" + binSuffix; + const exeName = binPrefix + "crashreporter" + binSuffix; let exe = Services.dirsvc.get("GreBinD", Ci.nsIFile); - exe.append(exeName); + exe.appendRelativePath(exeName); return exe; } -function runMinidumpAnalyzer(dumpFile, additionalArgs) { - let bin = getMinidumpAnalyzerPath(); +function runMinidumpAnalyzer(dumpFile) { + let bin = getCrashReporterPath(); let process = Cc["@mozilla.org/process/util;1"].createInstance(Ci.nsIProcess); process.init(bin); - let args = []; - if (additionalArgs) { - args = args.concat(additionalArgs); - } + let args = ["--analyze"]; args.push(dumpFile.path); process.run(true /* blocking */, args, args.length); } diff --git a/toolkit/crashreporter/test/unit/head_win64cfi.js b/toolkit/crashreporter/test/unit/head_win64cfi.js index 2daa64aecc23..dee1bddbdfc5 100644 --- a/toolkit/crashreporter/test/unit/head_win64cfi.js +++ b/toolkit/crashreporter/test/unit/head_win64cfi.js @@ -182,20 +182,19 @@ function assertStack(stack, expected) { } } -// Performs a crash, runs minidump-analyzer, and checks expected stack analysis. +// Performs a crash, runs crashreporter minidump analyzer, and checks expected +// stack analysis. // // how: The crash to perform. Constants defined in both CrashTestUtils.sys.mjs // and nsTestCrasher.cpp (i.e. CRASH_X64CFI_PUSH_NONVOL) // expectedStack: An array of {"symbol", "trust"} where trust is "cfi", // "context", "scan", et al. May be null if you don't need to check the stack. -// minidumpAnalyzerArgs: An array of additional arguments to pass to -// minidump-analyzer.exe. -async function do_x64CFITest(how, expectedStack, minidumpAnalyzerArgs) { +async function do_x64CFITest(how, expectedStack) { // Setup is run in the subprocess so we cannot use any closures. let setupFn = "crashType = CrashTestUtils." + how + ";"; let callbackFn = async function (minidumpFile, extra, extraFile) { - runMinidumpAnalyzer(minidumpFile, minidumpAnalyzerArgs); + runMinidumpAnalyzer(minidumpFile); // Refresh updated extra data extra = await IOUtils.readJSON(extraFile.path); diff --git a/toolkit/locales/en-US/crashreporter/crashreporter.ftl b/toolkit/locales/en-US/crashreporter/crashreporter.ftl index 95099d7f7b21..c837c52ebb87 100644 --- a/toolkit/locales/en-US/crashreporter/crashreporter.ftl +++ b/toolkit/locales/en-US/crashreporter/crashreporter.ftl @@ -51,7 +51,6 @@ crashreporter-crash-details = You can view details of this crash at { $url }. # Error strings -crashreporter-error-minidump-analyzer = Failed to run minidump-analyzer # $path (String) - the file path crashreporter-error-opening-file = Failed to open file ({ $path }) # $path (String) - the file path