fuzz: use process::exit panic hook in stdin_fuzz on macOS
What changed, and why it matters
This commit only changes internal fuzz-testing helper programs so they exit cleanly on macOS instead of getting stuck when a crash occurs. It does not affect the actual Lightning Dev Kit library, real Lightning nodes, or any user-facing code. There is no security vulnerability being fixed or introduced.
No action required. This is a developer-experience improvement for fuzz testing on macOS and does not require a security review or deployment response.
Security signals we found
No security-relevant code change: only fuzz test harness panic behavior on macOS
Change is platform-gated and test-only
No input validation, cryptography, memory safety, or network handling changes
Evidence from the diff
The commit adds a macOS-only panic hook to 71 auto-generated fuzz target binaries (plus their template). The hook flushes stdout/stderr, prints the panic info and a forced backtrace, then calls process::exit(1). This avoids macOS ReportCrash daemon behavior that can leave a panic=abort process in an uninterruptible wait during fuzz crash reproduction. The change is gated behind #[cfg(target_os = “macos”)] and only affects stdin_fuzz test harnesses, not production LDK code.
Changed components
fuzz/src/bin/*_target.rsfuzz/src/bin/target_template.txtInspect captured patch +864 / −0
diff --git a/fuzz/src/bin/base32_target.rs b/fuzz/src/bin/base32_target.rs
index 5f168fd..e79e6db 100644
--- a/fuzz/src/bin/base32_target.rs
+++ b/fuzz/src/bin/base32_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
base32_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/bech32_parse_target.rs b/fuzz/src/bin/bech32_parse_target.rs
index ad2f665..f9493bb 100644
--- a/fuzz/src/bin/bech32_parse_target.rs
+++ b/fuzz/src/bin/bech32_parse_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
bech32_parse_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/bolt11_deser_target.rs b/fuzz/src/bin/bolt11_deser_target.rs
index 9e2f33d..28b1e2d 100644
--- a/fuzz/src/bin/bolt11_deser_target.rs
+++ b/fuzz/src/bin/bolt11_deser_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
bolt11_deser_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/chanmon_consistency_target.rs b/fuzz/src/bin/chanmon_consistency_target.rs
index a729e3d..7649900 100644
--- a/fuzz/src/bin/chanmon_consistency_target.rs
+++ b/fuzz/src/bin/chanmon_consistency_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
chanmon_consistency_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/chanmon_deser_target.rs b/fuzz/src/bin/chanmon_deser_target.rs
index a2f109f..d3cf30b 100644
--- a/fuzz/src/bin/chanmon_deser_target.rs
+++ b/fuzz/src/bin/chanmon_deser_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
chanmon_deser_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/feature_flags_target.rs b/fuzz/src/bin/feature_flags_target.rs
index 2d23f96..b1f35f8 100644
--- a/fuzz/src/bin/feature_flags_target.rs
+++ b/fuzz/src/bin/feature_flags_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
feature_flags_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/fromstr_to_netaddress_target.rs b/fuzz/src/bin/fromstr_to_netaddress_target.rs
index fd34e02..8f3e5c3 100644
--- a/fuzz/src/bin/fromstr_to_netaddress_target.rs
+++ b/fuzz/src/bin/fromstr_to_netaddress_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
fromstr_to_netaddress_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/fs_store_target.rs b/fuzz/src/bin/fs_store_target.rs
index 8942ebe..8d84aad 100644
--- a/fuzz/src/bin/fs_store_target.rs
+++ b/fuzz/src/bin/fs_store_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
fs_store_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/full_stack_target.rs b/fuzz/src/bin/full_stack_target.rs
index a0be197..c1f20b1 100644
--- a/fuzz/src/bin/full_stack_target.rs
+++ b/fuzz/src/bin/full_stack_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
full_stack_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/indexedmap_target.rs b/fuzz/src/bin/indexedmap_target.rs
index 51d135b..3bc4390 100644
--- a/fuzz/src/bin/indexedmap_target.rs
+++ b/fuzz/src/bin/indexedmap_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
indexedmap_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/invoice_deser_target.rs b/fuzz/src/bin/invoice_deser_target.rs
index bcdbecd..44bf185 100644
--- a/fuzz/src/bin/invoice_deser_target.rs
+++ b/fuzz/src/bin/invoice_deser_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
invoice_deser_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/invoice_request_deser_target.rs b/fuzz/src/bin/invoice_request_deser_target.rs
index f6eee60..06d8f87 100644
--- a/fuzz/src/bin/invoice_request_deser_target.rs
+++ b/fuzz/src/bin/invoice_request_deser_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
invoice_request_deser_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/lsps_message_target.rs b/fuzz/src/bin/lsps_message_target.rs
index 4c6a0f4..37e6f10 100644
--- a/fuzz/src/bin/lsps_message_target.rs
+++ b/fuzz/src/bin/lsps_message_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
lsps_message_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/msg_accept_channel_target.rs b/fuzz/src/bin/msg_accept_channel_target.rs
index aa3b676..ee08a5f 100644
--- a/fuzz/src/bin/msg_accept_channel_target.rs
+++ b/fuzz/src/bin/msg_accept_channel_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_accept_channel_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/msg_accept_channel_v2_target.rs b/fuzz/src/bin/msg_accept_channel_v2_target.rs
index 469ae98..2903e11 100644
--- a/fuzz/src/bin/msg_accept_channel_v2_target.rs
+++ b/fuzz/src/bin/msg_accept_channel_v2_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_accept_channel_v2_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/msg_announcement_signatures_target.rs b/fuzz/src/bin/msg_announcement_signatures_target.rs
index f53aae6..064880a 100644
--- a/fuzz/src/bin/msg_announcement_signatures_target.rs
+++ b/fuzz/src/bin/msg_announcement_signatures_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_announcement_signatures_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/msg_blinded_message_path_target.rs b/fuzz/src/bin/msg_blinded_message_path_target.rs
index 4159e1c..277e04c 100644
--- a/fuzz/src/bin/msg_blinded_message_path_target.rs
+++ b/fuzz/src/bin/msg_blinded_message_path_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_blinded_message_path_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/msg_channel_announcement_target.rs b/fuzz/src/bin/msg_channel_announcement_target.rs
index 31cb611..42e72d5 100644
--- a/fuzz/src/bin/msg_channel_announcement_target.rs
+++ b/fuzz/src/bin/msg_channel_announcement_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_channel_announcement_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/msg_channel_details_target.rs b/fuzz/src/bin/msg_channel_details_target.rs
index 618c5d6..a03a7a4 100644
--- a/fuzz/src/bin/msg_channel_details_target.rs
+++ b/fuzz/src/bin/msg_channel_details_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_channel_details_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/msg_channel_ready_target.rs b/fuzz/src/bin/msg_channel_ready_target.rs
index eacacf1..a045781 100644
--- a/fuzz/src/bin/msg_channel_ready_target.rs
+++ b/fuzz/src/bin/msg_channel_ready_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_channel_ready_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/msg_channel_reestablish_target.rs b/fuzz/src/bin/msg_channel_reestablish_target.rs
index 9ed4a5d..b5449a9 100644
--- a/fuzz/src/bin/msg_channel_reestablish_target.rs
+++ b/fuzz/src/bin/msg_channel_reestablish_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_channel_reestablish_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/msg_channel_update_target.rs b/fuzz/src/bin/msg_channel_update_target.rs
index 56ffeff..9feb6e6 100644
--- a/fuzz/src/bin/msg_channel_update_target.rs
+++ b/fuzz/src/bin/msg_channel_update_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_channel_update_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/msg_closing_complete_target.rs b/fuzz/src/bin/msg_closing_complete_target.rs
index 3d8b137..22dd97c 100644
--- a/fuzz/src/bin/msg_closing_complete_target.rs
+++ b/fuzz/src/bin/msg_closing_complete_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_closing_complete_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/msg_closing_sig_target.rs b/fuzz/src/bin/msg_closing_sig_target.rs
index 8bd8e30..26058a5 100644
--- a/fuzz/src/bin/msg_closing_sig_target.rs
+++ b/fuzz/src/bin/msg_closing_sig_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_closing_sig_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/msg_closing_signed_target.rs b/fuzz/src/bin/msg_closing_signed_target.rs
index 68ed723..94408bc 100644
--- a/fuzz/src/bin/msg_closing_signed_target.rs
+++ b/fuzz/src/bin/msg_closing_signed_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_closing_signed_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/msg_commitment_signed_target.rs b/fuzz/src/bin/msg_commitment_signed_target.rs
index bac1912..e898784 100644
--- a/fuzz/src/bin/msg_commitment_signed_target.rs
+++ b/fuzz/src/bin/msg_commitment_signed_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_commitment_signed_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/msg_decoded_onion_error_packet_target.rs b/fuzz/src/bin/msg_decoded_onion_error_packet_target.rs
index 546acaf..47d8970 100644
--- a/fuzz/src/bin/msg_decoded_onion_error_packet_target.rs
+++ b/fuzz/src/bin/msg_decoded_onion_error_packet_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_decoded_onion_error_packet_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/msg_error_message_target.rs b/fuzz/src/bin/msg_error_message_target.rs
index f020c45..ee3904a 100644
--- a/fuzz/src/bin/msg_error_message_target.rs
+++ b/fuzz/src/bin/msg_error_message_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_error_message_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/msg_funding_created_target.rs b/fuzz/src/bin/msg_funding_created_target.rs
index cfa74ac..028aa17 100644
--- a/fuzz/src/bin/msg_funding_created_target.rs
+++ b/fuzz/src/bin/msg_funding_created_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_funding_created_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/msg_funding_signed_target.rs b/fuzz/src/bin/msg_funding_signed_target.rs
index de5f3b2..4894c66 100644
--- a/fuzz/src/bin/msg_funding_signed_target.rs
+++ b/fuzz/src/bin/msg_funding_signed_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_funding_signed_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/msg_gossip_timestamp_filter_target.rs b/fuzz/src/bin/msg_gossip_timestamp_filter_target.rs
index 4fd905b..6da383b 100644
--- a/fuzz/src/bin/msg_gossip_timestamp_filter_target.rs
+++ b/fuzz/src/bin/msg_gossip_timestamp_filter_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_gossip_timestamp_filter_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/msg_init_target.rs b/fuzz/src/bin/msg_init_target.rs
index 9d2bc34..f1d17c9 100644
--- a/fuzz/src/bin/msg_init_target.rs
+++ b/fuzz/src/bin/msg_init_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_init_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/msg_node_announcement_target.rs b/fuzz/src/bin/msg_node_announcement_target.rs
index 820fea1..b0615f3 100644
--- a/fuzz/src/bin/msg_node_announcement_target.rs
+++ b/fuzz/src/bin/msg_node_announcement_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_node_announcement_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/msg_open_channel_target.rs b/fuzz/src/bin/msg_open_channel_target.rs
index fbfd093..b3dbf38 100644
--- a/fuzz/src/bin/msg_open_channel_target.rs
+++ b/fuzz/src/bin/msg_open_channel_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_open_channel_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/msg_open_channel_v2_target.rs b/fuzz/src/bin/msg_open_channel_v2_target.rs
index 8c46c4c..0df11ad 100644
--- a/fuzz/src/bin/msg_open_channel_v2_target.rs
+++ b/fuzz/src/bin/msg_open_channel_v2_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_open_channel_v2_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/msg_ping_target.rs b/fuzz/src/bin/msg_ping_target.rs
index 52cd3d9..48f8559 100644
--- a/fuzz/src/bin/msg_ping_target.rs
+++ b/fuzz/src/bin/msg_ping_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_ping_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/msg_pong_target.rs b/fuzz/src/bin/msg_pong_target.rs
index da9e9cc..434e9cf 100644
--- a/fuzz/src/bin/msg_pong_target.rs
+++ b/fuzz/src/bin/msg_pong_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_pong_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/msg_query_channel_range_target.rs b/fuzz/src/bin/msg_query_channel_range_target.rs
index e177b23..cb87260 100644
--- a/fuzz/src/bin/msg_query_channel_range_target.rs
+++ b/fuzz/src/bin/msg_query_channel_range_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_query_channel_range_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/msg_query_short_channel_ids_target.rs b/fuzz/src/bin/msg_query_short_channel_ids_target.rs
index 53ca822..bc286a7 100644
--- a/fuzz/src/bin/msg_query_short_channel_ids_target.rs
+++ b/fuzz/src/bin/msg_query_short_channel_ids_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_query_short_channel_ids_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/msg_reply_channel_range_target.rs b/fuzz/src/bin/msg_reply_channel_range_target.rs
index 2a776ea..c7df076 100644
--- a/fuzz/src/bin/msg_reply_channel_range_target.rs
+++ b/fuzz/src/bin/msg_reply_channel_range_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_reply_channel_range_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/msg_reply_short_channel_ids_end_target.rs b/fuzz/src/bin/msg_reply_short_channel_ids_end_target.rs
index 02ffd90..2c73d86 100644
--- a/fuzz/src/bin/msg_reply_short_channel_ids_end_target.rs
+++ b/fuzz/src/bin/msg_reply_short_channel_ids_end_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_reply_short_channel_ids_end_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/msg_revoke_and_ack_target.rs b/fuzz/src/bin/msg_revoke_and_ack_target.rs
index 0a20ea7..6379d39 100644
--- a/fuzz/src/bin/msg_revoke_and_ack_target.rs
+++ b/fuzz/src/bin/msg_revoke_and_ack_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_revoke_and_ack_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/msg_shutdown_target.rs b/fuzz/src/bin/msg_shutdown_target.rs
index ed26a25..6bf0409 100644
--- a/fuzz/src/bin/msg_shutdown_target.rs
+++ b/fuzz/src/bin/msg_shutdown_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_shutdown_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/msg_splice_ack_target.rs b/fuzz/src/bin/msg_splice_ack_target.rs
index 0a1f13b..96f373d 100644
--- a/fuzz/src/bin/msg_splice_ack_target.rs
+++ b/fuzz/src/bin/msg_splice_ack_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_splice_ack_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/msg_splice_init_target.rs b/fuzz/src/bin/msg_splice_init_target.rs
index 9a7bc60..73d4319 100644
--- a/fuzz/src/bin/msg_splice_init_target.rs
+++ b/fuzz/src/bin/msg_splice_init_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_splice_init_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/msg_splice_locked_target.rs b/fuzz/src/bin/msg_splice_locked_target.rs
index 0f9b0a2..9210113 100644
--- a/fuzz/src/bin/msg_splice_locked_target.rs
+++ b/fuzz/src/bin/msg_splice_locked_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_splice_locked_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/msg_stfu_target.rs b/fuzz/src/bin/msg_stfu_target.rs
index d6b898b..d00536c 100644
--- a/fuzz/src/bin/msg_stfu_target.rs
+++ b/fuzz/src/bin/msg_stfu_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_stfu_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/msg_tx_abort_target.rs b/fuzz/src/bin/msg_tx_abort_target.rs
index 3b82409..8f216b4 100644
--- a/fuzz/src/bin/msg_tx_abort_target.rs
+++ b/fuzz/src/bin/msg_tx_abort_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_tx_abort_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/msg_tx_ack_rbf_target.rs b/fuzz/src/bin/msg_tx_ack_rbf_target.rs
index d4905a5..90b34c7 100644
--- a/fuzz/src/bin/msg_tx_ack_rbf_target.rs
+++ b/fuzz/src/bin/msg_tx_ack_rbf_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_tx_ack_rbf_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/msg_tx_add_input_target.rs b/fuzz/src/bin/msg_tx_add_input_target.rs
index 627797f..ce9700b 100644
--- a/fuzz/src/bin/msg_tx_add_input_target.rs
+++ b/fuzz/src/bin/msg_tx_add_input_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_tx_add_input_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/msg_tx_add_output_target.rs b/fuzz/src/bin/msg_tx_add_output_target.rs
index be30155..0268219 100644
--- a/fuzz/src/bin/msg_tx_add_output_target.rs
+++ b/fuzz/src/bin/msg_tx_add_output_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_tx_add_output_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/msg_tx_complete_target.rs b/fuzz/src/bin/msg_tx_complete_target.rs
index 12abb32..48864f0 100644
--- a/fuzz/src/bin/msg_tx_complete_target.rs
+++ b/fuzz/src/bin/msg_tx_complete_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_tx_complete_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/msg_tx_init_rbf_target.rs b/fuzz/src/bin/msg_tx_init_rbf_target.rs
index 6ede611..a8b613c 100644
--- a/fuzz/src/bin/msg_tx_init_rbf_target.rs
+++ b/fuzz/src/bin/msg_tx_init_rbf_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_tx_init_rbf_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/msg_tx_remove_input_target.rs b/fuzz/src/bin/msg_tx_remove_input_target.rs
index a508497..1e46c54 100644
--- a/fuzz/src/bin/msg_tx_remove_input_target.rs
+++ b/fuzz/src/bin/msg_tx_remove_input_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_tx_remove_input_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/msg_tx_remove_output_target.rs b/fuzz/src/bin/msg_tx_remove_output_target.rs
index 993ddb0..3a9c178 100644
--- a/fuzz/src/bin/msg_tx_remove_output_target.rs
+++ b/fuzz/src/bin/msg_tx_remove_output_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_tx_remove_output_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/msg_tx_signatures_target.rs b/fuzz/src/bin/msg_tx_signatures_target.rs
index 8054d42..77f34cc 100644
--- a/fuzz/src/bin/msg_tx_signatures_target.rs
+++ b/fuzz/src/bin/msg_tx_signatures_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_tx_signatures_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/msg_update_add_htlc_target.rs b/fuzz/src/bin/msg_update_add_htlc_target.rs
index 258dd24..3ff5cf8 100644
--- a/fuzz/src/bin/msg_update_add_htlc_target.rs
+++ b/fuzz/src/bin/msg_update_add_htlc_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_update_add_htlc_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/msg_update_fail_htlc_target.rs b/fuzz/src/bin/msg_update_fail_htlc_target.rs
index b4ae4e5..5b8a7e5 100644
--- a/fuzz/src/bin/msg_update_fail_htlc_target.rs
+++ b/fuzz/src/bin/msg_update_fail_htlc_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_update_fail_htlc_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/msg_update_fail_malformed_htlc_target.rs b/fuzz/src/bin/msg_update_fail_malformed_htlc_target.rs
index fb5325d..e3e8918 100644
--- a/fuzz/src/bin/msg_update_fail_malformed_htlc_target.rs
+++ b/fuzz/src/bin/msg_update_fail_malformed_htlc_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_update_fail_malformed_htlc_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/msg_update_fee_target.rs b/fuzz/src/bin/msg_update_fee_target.rs
index d8e9a26..98e5118 100644
--- a/fuzz/src/bin/msg_update_fee_target.rs
+++ b/fuzz/src/bin/msg_update_fee_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_update_fee_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/msg_update_fulfill_htlc_target.rs b/fuzz/src/bin/msg_update_fulfill_htlc_target.rs
index cec5ccf..cb15644 100644
--- a/fuzz/src/bin/msg_update_fulfill_htlc_target.rs
+++ b/fuzz/src/bin/msg_update_fulfill_htlc_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_update_fulfill_htlc_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/offer_deser_target.rs b/fuzz/src/bin/offer_deser_target.rs
index d788a8b..c4a03f6 100644
--- a/fuzz/src/bin/offer_deser_target.rs
+++ b/fuzz/src/bin/offer_deser_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
offer_deser_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/onion_hop_data_target.rs b/fuzz/src/bin/onion_hop_data_target.rs
index 1677d07..3b9b55b 100644
--- a/fuzz/src/bin/onion_hop_data_target.rs
+++ b/fuzz/src/bin/onion_hop_data_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
onion_hop_data_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/onion_message_target.rs b/fuzz/src/bin/onion_message_target.rs
index ff5feec..bb343e9 100644
--- a/fuzz/src/bin/onion_message_target.rs
+++ b/fuzz/src/bin/onion_message_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
onion_message_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/peer_crypt_target.rs b/fuzz/src/bin/peer_crypt_target.rs
index 6b21d8e..c68111d 100644
--- a/fuzz/src/bin/peer_crypt_target.rs
+++ b/fuzz/src/bin/peer_crypt_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
peer_crypt_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/process_network_graph_target.rs b/fuzz/src/bin/process_network_graph_target.rs
index 2630664..7da2aaf 100644
--- a/fuzz/src/bin/process_network_graph_target.rs
+++ b/fuzz/src/bin/process_network_graph_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
process_network_graph_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/process_onion_failure_target.rs b/fuzz/src/bin/process_onion_failure_target.rs
index 4c613a0..9e1cc8a 100644
--- a/fuzz/src/bin/process_onion_failure_target.rs
+++ b/fuzz/src/bin/process_onion_failure_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
process_onion_failure_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/refund_deser_target.rs b/fuzz/src/bin/refund_deser_target.rs
index c61c4f7..13837d2 100644
--- a/fuzz/src/bin/refund_deser_target.rs
+++ b/fuzz/src/bin/refund_deser_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
refund_deser_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/router_target.rs b/fuzz/src/bin/router_target.rs
index 73d6d1b..52a8c34 100644
--- a/fuzz/src/bin/router_target.rs
+++ b/fuzz/src/bin/router_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
router_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/static_invoice_deser_target.rs b/fuzz/src/bin/static_invoice_deser_target.rs
index 59b8544..477f786 100644
--- a/fuzz/src/bin/static_invoice_deser_target.rs
+++ b/fuzz/src/bin/static_invoice_deser_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
static_invoice_deser_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/target_template.txt b/fuzz/src/bin/target_template.txt
index b085ae7..9b0dff8 100644
--- a/fuzz/src/bin/target_template.txt
+++ b/fuzz/src/bin/target_template.txt
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
TARGET_NAME_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
diff --git a/fuzz/src/bin/zbase32_target.rs b/fuzz/src/bin/zbase32_target.rs
index c17ea0a..68c8cf3 100644
--- a/fuzz/src/bin/zbase32_target.rs
+++ b/fuzz/src/bin/zbase32_target.rs
@@ -57,6 +57,18 @@ fuzz_target!(|data: &[u8]| {
fn main() {
use std::io::Read;
+ // On macOS, panic=abort causes the process to send SIGABRT which can leave it
+ // stuck in an uninterruptible state due to the ReportCrash daemon. Using
+ // process::exit in a panic hook avoids this by terminating cleanly.
+ #[cfg(target_os = "macos")]
+ std::panic::set_hook(Box::new(|panic_info| {
+ use std::io::Write;
+ let _ = std::io::stdout().flush();
+ eprintln!("{}\n{}", panic_info, std::backtrace::Backtrace::force_capture());
+ let _ = std::io::stderr().flush();
+ std::process::exit(1);
+ }));
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
zbase32_test(&data, lightning_fuzz::utils::test_logger::Stdout {});
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.