Skip to content

FuzzTest Rust: Switch sanitizer crash reporting to ReportErrorSummary hook. - #2233

Open
copybara-service[bot] wants to merge 1 commit into
mainfrom
cl/982461086
Open

copybara-service[bot] wants to merge 1 commit into
mainfrom
cl/982461086

Conversation

@copybara-service

@copybara-service copybara-service Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

FuzzTest Rust: Switch sanitizer crash reporting to ReportErrorSummary hook.

Instead of relying on __sanitizer_set_death_callback and ASan-specific
__asan_get_report_description, override __sanitizer_report_error_summary
to capture crash summaries across all sanitizers (ASan, MSan, TSan, UBSan, LSan,
etc.), matching the C++ FuzzTest runtime approach.

Move the __sanitizer_report_error_summary override into sanitizer_interface
and expose an extern "C" callback registration entry point
(FuzzTestSetSanitizerErrorSummaryCallback) so that both C++ and Rust share the
exact same sanitizer hook and crash-type parser.

This fixes missing crash reports when sanitizers abort without triggering death
callbacks (such as MSan nested bugs), extracts detailed crash descriptions for
all sanitizers, and removes the unstable #![feature(cfg_sanitize)] requirement
from the fuzztest library crate for OSS Cargo builds.

@copybara-service copybara-service Bot changed the title FuzzTest Rust: Switch sanitizer crash reporting to report_error_summary hook. FuzzTest Rust: Switch sanitizer crash reporting to ReportErrorSummary hook. Sep 18, 2026
… hook.

Instead of relying on `__sanitizer_set_death_callback` and ASan-specific
`__asan_get_report_description`, override `__sanitizer_report_error_summary`
to capture crash summaries across all sanitizers (ASan, MSan, TSan, UBSan, LSan,
etc.), matching the C++ FuzzTest runtime approach.

Move the `__sanitizer_report_error_summary` override into `sanitizer_interface`
and expose an `extern "C"` callback registration entry point
(`FuzzTestSetSanitizerErrorSummaryCallback`) so that both C++ and Rust share the
exact same sanitizer hook and crash-type parser.

This fixes missing crash reports when sanitizers abort without triggering death
callbacks (such as MSan nested bugs), extracts detailed crash descriptions for
all sanitizers, and removes the unstable `#![feature(cfg_sanitize)]` requirement
from the `fuzztest` library crate for OSS Cargo builds.

PiperOrigin-RevId: 982461086
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant