| Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
|
|
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`.
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
Useful for debugging nil derefs in linked Go code and whatnot.
Co-authored-by: Sebastian Holmin <sebastian.holmin@mullvad.net>
|
|
`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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|