Skip to content

Provide prebuilt std artifacts for sanitizers #78533

@Gankra

Description

@Gankra

Based off of discussion in zulip

Rust currently has unstable support for sanitizers (#39699), but some sanitizers require (or prefer) std to be built with special instrumentation. The unstable cargo -Zbuild-std feature was introduced to address this issue, allowing you to ask cargo to rebuild std with your current RUSTFLAGS.

However, this is a bit messy to work with, and produces a lot of redundant work. Especially in the context of CI with vendored environments. It would be nice if prebuilt stds were provided for some configurations.

Sanitizers that merit consideration:

  • ThreadSanitizer (tsan) -- requires an instrumented build to work right
  • MemorySanitizer (msan) -- requires an instrumented built to work right
  • AddressSanitizer (asan) -- can produce more accurate results with an instrumented built

For reference, Firefox is currently only using the -Zsanitizer flag for its "linux64" tsan builds, which I believe are currently debian8-amd64 machines. We have asan tasks in many different configurations, but evidently we haven't yet bothered to use -Zsanitizer for them (presumably because it's not required).

It has been suggested to provide builds for all the tier1 platforms, but I don't personally have an opinion on that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-sanitizersArea: Sanitizers for correctness and code qualityC-enhancementCategory: An issue proposing an enhancement or a PR with one.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions