#5220·diesel

Run tests using the memory sanitizer

Author: weiznichCreated Sep 18, 2026Updated Sep 18, 2026
Labelsenhancementhelp wantedsqlitemysqlpostgresCI

Rust Version

stable

Diesel Version

main

Diesel Features

sqlite

Database Version

Not relevant

Operating System Version

Linux

What happened?

Our CI setup already runs all test with the address sanitizer enabled. We use this to detect potential issues in our FFI layer.

What did you expect to happen?

We would like to also enable the memory sanitizer (and potentially other useful sanitizers as well) for the same test runs. This should be done as part of the sqlite_bundled, postgres_bundled and mysql_bundled CI test jobs.

https://github.com/diesel-rs/diesel/blob/bcf28baa8a2be82aa46b79aa111062363e23e6d5/.github/workflows/ci.yml#L460-L602

This might uncover additional issues in our FFI layer, that need to be triaged and fixed in a separate step.

We also might need to perform changes to the upstream *-sys bindings crates to allow linking additional sanitizers.

Checklist

  • I have already looked over the issue tracker and the discussion forum for similar possible closed issues.

  • This issue can be reproduced on Rust's stable channel. (Please submit the issue in the Rust issue tracker instead if that's not the case)

  • This issue can be reproduced without requiring a third party crate