Commit c084ce2
committed
Release v0.12.0: gate OOM hook behind opt-in feature, bump version
Makes masstin compile cleanly on stable Rust while keeping the full OOM
recovery hook in the published release binaries.
## Problem
The EVTX carving path installs `std::alloc::set_alloc_error_hook` so
that allocation failures triggered by the `evtx` crate when it parses
corrupt BinXML from unallocated space become catchable panics instead
of process aborts. That function is still nightly-only, so the crate
attribute `#![feature(alloc_error_hook)]` on `src/lib.rs` forced the
whole crate to require nightly — including a plain `cargo install masstin`
from crates.io, which is not acceptable for a tool aimed at responders.
## Fix
- New Cargo feature `nightly-oom-hook`, disabled by default.
- `lib.rs` gates the nightly attribute with
`#![cfg_attr(feature = "nightly-oom-hook", feature(alloc_error_hook))]`
so stable sees no unstable-feature attribute at all.
- `parse_carve.rs` has two `install_oom_hook()` definitions:
- `#[cfg(feature = "nightly-oom-hook")]` — the real hook
- `#[cfg(not(...))]` — a no-op stub
- `.github/workflows/release.yml` switched from stable to nightly and
now builds with `--features nightly-oom-hook` on all three targets,
so the binaries published under GitHub Releases carry full OOM
protection out of the box.
- README: short build-note paragraph explaining the policy. End users
downloading released binaries see a normal executable and never
interact with Rust or nightly. Contributors compiling from source on
stable get a fully functional masstin; only the OOM recovery in the
carving path becomes a no-op, which only affects the 1% of images
with pathological BinXML corruption.
Version bumped from 0.11.0 to 0.12.0 — significant feature release
covering parse-custom, EVTX carving hardening, and this build policy.
Verified locally that both `cargo build --release` and
`cargo build --release --features nightly-oom-hook` compile cleanly
on the nightly toolchain currently installed.1 parent 74d6a88 commit c084ce2
6 files changed
Lines changed: 54 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
| 31 | + | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
38 | 45 | | |
39 | 46 | | |
40 | 47 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
10 | 22 | | |
11 | 23 | | |
12 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
| 55 | + | |
54 | 56 | | |
55 | 57 | | |
56 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
2 | 6 | | |
3 | 7 | | |
4 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
32 | 38 | | |
33 | 39 | | |
34 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
35 | 53 | | |
36 | 54 | | |
37 | 55 | | |
| |||
0 commit comments