Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
kevingosse committed Feb 20, 2025
1 parent 586e88b commit 3ab5db5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions crashtracker-ffi/src/collector_windows/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ pub unsafe extern "C" fn ddog_crasht_exception_event_callback(

let pid = GetProcessId(exception_information.hProcess);
let crash_tid = GetThreadId(exception_information.hThread);
let threads = list_threads(pid);
let threads = list_threads(pid).expect("Failed to list threads");
let modules = list_modules(exception_information.hProcess).unwrap_or_else(|_| Vec::new());

let wer_context = read_wer_context(exception_information.hProcess, context as usize)?;
Expand All @@ -262,7 +262,7 @@ pub unsafe extern "C" fn ddog_crasht_exception_event_callback(

let mut builder = CrashInfoBuilder::new();

for thread in threads.unwrap() {
for thread in threads {
let stack_result = walk_thread_stack(exception_information.hProcess, thread, &modules);

let stack: StackTrace = stack_result.unwrap_or_else(|e| {
Expand Down
4 changes: 1 addition & 3 deletions sidecar/src/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use futures::FutureExt;
use lazy_static::lazy_static;
use manual_future::ManualFuture;
use spawn_worker::{write_crashtracking_trampoline, SpawnWorker, Stdio};
use std::ffi::{CStr, CString};
use std::ffi::CStr;
use std::io::{self, Error};
use std::os::windows::io::{AsRawHandle, IntoRawHandle, OwnedHandle};
use std::ptr::null_mut;
Expand All @@ -38,8 +38,6 @@ use winapi::{
winnt::{TokenUser, HANDLE, TOKEN_QUERY, TOKEN_USER},
},
};
use windows::core::PCWSTR;
use windows::Win32::System::LibraryLoader::LoadLibraryW;

#[no_mangle]
pub extern "C" fn ddog_daemon_entry_point() {
Expand Down

0 comments on commit 3ab5db5

Please sign in to comment.