Skip to content

Add Rust AddressSanitizer CI coverage - #9210

Open
fredlday-oss wants to merge 1 commit into
google:masterfrom
fredlday-oss:google-patch-rust-safety
Open

Add Rust AddressSanitizer CI coverage#9210
fredlday-oss wants to merge 1 commit into
google:masterfrom
fredlday-oss:google-patch-rust-safety

Conversation

@fredlday-oss

Copy link
Copy Markdown

Summary

Add a dedicated Linux CI job that runs the Rust usage test suite under AddressSanitizer.

This provides continuous sanitizer coverage for FlatBuffers' Rust implementation, including code paths that rely on unsafe, as discussed in #6401.

Changes

  • Add a build-rust-linux-asan GitHub Actions job on Ubuntu 24.04.
  • Install nightly Rust with the rust-src component.
  • Enable AddressSanitizer through RUSTFLAGS and RUSTDOCFLAGS.
  • Build the standard library with -Zbuild-std.
  • Run tests/rust_usage_test for x86_64-unknown-linux-gnu.

Validation

The same configuration was tested locally on x86_64 Linux.

The Rust usage test suite completed successfully under AddressSanitizer with no sanitizer findings, including the main integration suite with 276 tests and the additional array, optional-scalar, defaults, vtable, and sample tests.

No production library behavior is changed by this PR.

Refs #6401

@google-cla

google-cla Bot commented Aug 28, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@github-actions github-actions Bot added the CI Continuous Integration label Aug 28, 2026
@fredlday-oss
fredlday-oss force-pushed the google-patch-rust-safety branch from 2f10826 to 315c3f9 Compare August 28, 2026 19:54
Run the Rust usage test suite under AddressSanitizer on Linux.

This adds continuous sanitizer coverage for FlatBuffers' Rust code and
helps detect memory-safety regressions in unsafe code paths.

The configuration was validated locally on x86_64 Linux with nightly
Rust and rust-src, with the complete Rust usage test suite passing
under AddressSanitizer.

Refs google#6401.
@fredlday-oss
fredlday-oss force-pushed the google-patch-rust-safety branch from 315c3f9 to bd5830d Compare August 28, 2026 20:00
@fredlday-oss

Copy link
Copy Markdown
Author

@googlebot rescan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI Continuous Integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant