Skip to content

Commit 8fcded1

Browse files
authored
Prep minidumper release (#50)
* Update minidump-writer * Align crash-context * Update CHANGELOG * Fix CI * Fix x86 sigfpe test
1 parent e6c580d commit 8fcded1

File tree

6 files changed

+26
-17
lines changed

6 files changed

+26
-17
lines changed

.github/workflows/rust-ci.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- run: cargo fetch
3333
- name: cargo clippy
3434
run: |
35-
cargo clippy -p crash-context -p crash-handler -p sadness-generator --all-targets --all-features -- -D warnings
35+
cargo clippy --all-targets --all-features -- -D warnings
3636
3737
test:
3838
name: Test
@@ -45,9 +45,9 @@ jobs:
4545
- uses: dtolnay/rust-toolchain@stable
4646
- run: cargo fetch
4747
- name: cargo test build
48-
run: cargo build -p crash-context -p crash-handler -p sadness-generator --tests
48+
run: cargo build --tests
4949
- name: cargo test
50-
run: cargo test -p crash-context -p crash-handler -p sadness-generator
50+
run: cargo test
5151

5252
deny-check:
5353
name: cargo-deny
@@ -65,6 +65,7 @@ jobs:
6565
- run: cargo fetch
6666
- name: cargo publish check
6767
run: |
68-
cargo publish --dry-run --manifest-path crash-handler/Cargo.toml
69-
#cargo publish --dry-run --manifest-path minidumper/Cargo.toml
7068
cargo publish --dry-run --manifest-path crash-context/Cargo.toml
69+
cargo publish --dry-run --manifest-path crash-handler/Cargo.toml
70+
cargo publish --dry-run --manifest-path minidumper/Cargo.toml
71+
cargo publish --dry-run --manifest-path sadness-generator/Cargo.toml

Cargo.toml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,3 @@ members = [
99

1010
[profile.dev]
1111
debug = 2
12-
13-
[patch.crates-io]
14-
minidump-writer = { git = "https://github.com/rust-minidump/minidump-writer", branch = "exc-encoding" }
15-
#minidump-writer = { path = "../mdw" }
16-
crash-context = { path = "crash-context" }

crash-handler/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ debug-print = []
2222
cfg-if = "1.0"
2323
# Definition of a portable crash-context that can be shared between various
2424
# crates
25-
crash-context = { version = "0.4", path = "../crash-context" }
25+
crash-context = "0.4"
2626
# Wrapper around libc
2727
libc = "0.2"
2828
# Nicer sync primitives

minidumper-test/src/lib.rs

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -419,10 +419,20 @@ pub fn assert_minidump(md_buf: &[u8], signal: Signal) {
419419
));
420420
}
421421
Signal::Fpe => {
422-
verify!(CrashReason::MacGeneral(
423-
errors::ExceptionCodeMac::EXC_ARITHMETIC,
424-
0
425-
));
422+
cfg_if::cfg_if! {
423+
if #[cfg(target_arch = "aarch64")] {
424+
verify!(CrashReason::MacGeneral(
425+
errors::ExceptionCodeMac::EXC_ARITHMETIC,
426+
0
427+
));
428+
} else if #[cfg(target_arch = "x86_64")] {
429+
verify!(CrashReason::MacArithmeticX86(
430+
errors::ExceptionCodeMacArithmeticX86Type::EXC_I386_DIV,
431+
));
432+
} else {
433+
panic!("this target architecture is not supported on mac");
434+
}
435+
}
426436
}
427437
Signal::Illegal => {
428438
cfg_if::cfg_if! {

minidumper/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
<!-- next-header -->
1111
## [Unreleased] - ReleaseDate
12+
### Changed
13+
- [PR#50](https://github.com/EmbarkStudios/crash-handling/pull/50) updated `minidump-writer` to take advantage of improvements in writing macos minidumps.
14+
1215
## [0.4.0] - 2022-07-19
1316
### Changed
1417
- [PR#41](https://github.com/EmbarkStudios/crash-handling/pull/41) added support for detecting stale client connections for cases where the OS might not efficiently close the client end of the connection so that the server notices and removes the client from the event loop.

minidumper/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ keywords = ["crash", "minidump", "ipc", "out-of-process"]
1919
[dependencies]
2020
# Nicer cfg handling
2121
cfg-if = "1.0"
22-
crash-context = { version = "0.4", path = "../crash-context" }
22+
crash-context = "0.4"
2323
libc = "0.2"
2424
# Basic log emitting
2525
log = "0.4"
2626
# Minidump writing
27-
minidump-writer = "0.3"
27+
minidump-writer = "0.4"
2828
# Event loop
2929
polling = "2.2"
3030
# Nicer locking primitives

0 commit comments

Comments
 (0)