Skip to content

Conversation

@yuriivcs
Copy link
Collaborator

@yuriivcs yuriivcs commented Dec 22, 2025

This Pull Request introduces AddressSanitizer (ASAN) support for the Linux x86_64 and Linux x86_64 CUDA toolchains. These changes have been verified through integration testing with the XLA and JAX projects.

Current Limitations & Maintenance
clang-with-sanitizer: This feature will remain available for the time being to provide additional diagnostic capabilities during the transition.

Planned Improvements
Provide a comprehensive technical description for the clang-with-sanitizer feature.
Introduce a wrapper function to simplify the import of sanitized toolchains and provide detailed configuration guidelines.

@yuriivcs yuriivcs changed the title ASAN support added Add ASAN support Jan 9, 2026
@yuriivcs yuriivcs requested a review from ybaturina January 9, 2026 22:31
],
)

FEATURES_ESSENTIAL = [
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see it's declared twice for CUDA and non-CUDA implementation. The majority of the entries is intersecting with each other. Do you think it's worth moving it in some separate list?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since our toolchains are still under active development, I recommend deferring this optimization until the feature set stabilizes. Once we have implemented the core functionality and shifted our focus to long-term support, we can address optimizations without the risk of shifting requirements between releases.

],
))

linker_dir_flags = depset([
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was it done this way for the readability? or can it be changed like this?

toolchain_libraries = toolchain_import_info.linking_context.static_libraries.to_list() +  
    toolchain_import_info.linking_context.dynamic_libraries.to_list() +
    toolchain_import_info.linking_context.additional.to_list()

linker_dir_flags = depset([
        "-L" + file.dirname
        for file in toolchain_libraries
    ]).to_list()

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, but the current version looks a little bit more readable to me because it doesn't have long lines of code and I can easily read what types of libraries were handled.

@yuriivcs
Copy link
Collaborator Author

Hi Yulia,
I've added changes to asan.yaml task and it's finished successfully.
Result of execution: https://github.com/jax-ml/jax/actions/runs/20933324076/job/60149512471?pr=33774

@yuriivcs yuriivcs merged commit c4aa7d6 into google-ml-infra:main Jan 13, 2026
2 checks passed
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.

2 participants