summaryrefslogtreecommitdiffhomepage
path: root/mullvad-daemon/src/exception_logging
AgeCommit message (Collapse)AuthorFilesLines
2025-07-10Run `cargo fmt`Sebastian Holmin2-5/+5
2025-02-25Allow undocumented_unsafe_blocks in even more modulesJoakim Hulthe1-0/+2
2025-02-25Remove redundant warn(undocumented_unsafe_blocks) attrsJoakim Hulthe1-1/+0
2025-02-12Format workspaceSebastian Holmin2-5/+5
The 2024 edition contains new formatting rules. All of these are not compatible with the 2021 formatting style, but most of them are. To change the formatting to be as close to the new style as possible while remaining compatible with the 2021 edition, I first ran `cargo +beta fmt` with the edition set to 2024, then, with the edition set to 2021, I ran `cargo fmt`.
2025-02-12Fix `clippy::precedence`Sebastian Holmin2-5/+5
2025-02-12Fix `unsafe_op_in_unsafe_fn` warningSebastian Holmin1-4/+5
2024-12-19Remove get_context_info for 32 bit x86 targetsLinus Färnstrand1-1/+1
2024-12-19Replace winapi with windows-sys in most cases in exception handlerLinus Färnstrand1-8/+12
2024-11-26Make unix signal-handler signal-safeJoakim Hulthe2-122/+260
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-11Import structs and functions from `windows_sys`Markus Pettersson1-42/+35
2024-11-11Use safe wrapping_add when doing pointer arithmeticMarkus Pettersson1-1/+1
2024-11-11Move pub function to top of moduleMarkus Pettersson1-5/+5
2024-11-07Disable `fault_handler` in release buildsJoakim Hulthe1-79/+131
2024-08-15Add support for Windows ARM64Daniel Paoliello1-4/+55
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-27Replace err_derive with thiserrorJoakim Hulthe1-6/+5
`err_derive` is unmaintained and will probably stop working with rust edition 2024. `thiserror` is almost a drop-in replacement. This commit simply replaces all occurences of `derive(err_derive::Error)` with `derive(thiserror::Error)` and fixes the attributes, but the Error and Display impls should be identical.
2024-02-19Fix redundant importsDavid Lönnhager1-1/+0
2024-01-05Run `cargo +nightly fmt`Sebastian Holmin1-2/+5
2023-10-20Add process module to talpid-windowsDavid Lönnhager1-90/+6
2023-08-08Use std::ffi for int/short/char FFI typesLinus Färnstrand1-2/+2
2023-08-08Always use std::ffi::c_char for a c_char typeLinus Färnstrand1-2/+2
2023-08-08Migrate from libc::c_void to std::ffi::c_voidLinus Färnstrand2-3/+3
2023-04-21Apply clippy --fix fixesLinus Färnstrand1-3/+3
This commit does not contain everything that `cargo clippy --fix` changed on Windows. But the least controversial and simplest subset. The remaining fixes I felt could use some manual cleanup also.
2022-09-01Replace winapi with windows-sys for all remaining cratesDavid Lönnhager1-33/+32
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īls3-0/+406