summaryrefslogtreecommitdiffhomepage
path: root/mullvad-daemon/src/exception_logging/unix.rs
AgeCommit message (Collapse)AuthorFilesLines
2025-07-10Run `cargo fmt`Sebastian Holmin1-3/+3
2025-02-25Remove redundant warn(undocumented_unsafe_blocks) attrsJoakim Hulthe1-1/+0
2024-11-26Make unix signal-handler signal-safeJoakim Hulthe1-121/+259
Other changes: - Re-enable the signal handler in release-builds. - Disable backtrace printing by default since it's not signal-safe. - Add `MULLVAD_BACKTRACE_ON_FAULT` env variable to enable backtracing. - Remove the alternate signal stack. The reasons for this are: - Setting up an alt-stack in a safe way is not trivial, our previous attempt was unsound in the presence of stack overflows. It can be done safely with mmap, but would require careful review. - The alt-stack is thread-local, meaning it would need to be initialized on a per-thread basis. We would need to hook into tokio and std::thread::spawn to be able to get good coverage, and even then there would no good way to ensure that *all* threads have an alternate stack, except that... - Rust (by default) allocates an alternate stack for every thread. Unfortunately, the prescence of Go code in our linked binary disables this feature. IMO, we should strive towards not having any Go code linked into the daemon for this reason.
2024-11-07Disable `fault_handler` in release buildsJoakim Hulthe1-79/+131
2024-06-25Print backtrace on caught fault signals (unix)Joakim Hulthe1-0/+5
Useful for debugging nil derefs in linked Go code and whatnot. Co-authored-by: Sebastian Holmin <sebastian.holmin@mullvad.net>
2024-02-19Fix redundant importsDavid Lönnhager1-1/+0
2024-01-05Run `cargo +nightly fmt`Sebastian Holmin1-2/+5
2023-08-08Use std::ffi for int/short/char FFI typesLinus Färnstrand1-2/+2
2023-08-08Migrate from libc::c_void to std::ffi::c_voidLinus Färnstrand1-1/+2
2022-06-21Fix the large majority of clippy warningsJonathan1-1/+1
This commit fixes most of the remaining clippy warnings in the codebase. These warnings were the more semantically difficult ones to fix. There are some warnings that remain from the rebase that will be fixed in the upcoming PR.
2022-01-11Use ": " as delimiter instead of " - " between messages and valueLinus Färnstrand1-1/+1
2020-08-28Remove a use of wildcard imports in favor of importing used itemsLinus Färnstrand1-1/+1
2020-02-28Use alternative stackEmīls1-19/+67
2020-02-28Add signal handler for unixEmīls1-0/+34
2020-02-28Factor exception logging to be multi-platformEmīls1-0/+3