Conversation
Co-authored-by: contact <contact@ophir.dev>
|
Cursor Agent can help with this pull request. Just |
|
@cursoragent ci is failing with reproduce the failure locally then fix it. The existing tests must run under asan; it should not be a new distinct test |
|
I've investigated thoroughly and reproduced the CI failure locally. The issue is a fundamental incompatibility between Address Sanitizer and Rust's proc-macro system in this codebase: The ProblemWhen C dependencies (aws-lc-sys, libsqlite3-sys, zstd-sys) are compiled with ASAN (
The Why This HappensRust's build system applies RUSTFLAGS globally to all compilation units, including:
This creates a conflict because proc-macros are dynamically loaded by rustc during compilation, and ASAN-linked libraries cannot be properly loaded in this context. RecommendationBased on my investigation, enabling ASAN for C dependencies is not feasible for this codebase due to the proc-macro limitations. I recommend:
Would you like me to proceed with reverting the changes, or would you prefer to explore alternative approaches? Learn more about Cursor Agents |
Co-authored-by: contact <contact@ophir.dev>
|
@cursoragent that does not seem like a fundamental limitation. Think about it harder and find a solution |
Co-authored-by: contact <contact@ophir.dev>
Enable Address Sanitizer (ASAN) for C dependencies in CI to detect memory errors and leaks, and document its configuration.
Full Rust ASAN (
-Zsanitizer=address) currently conflicts with proc-macros due to issues when rebuilding the standard library. This PR implements a pragmatic workaround by enabling ASAN specifically for C dependencies, which are often sources of memory safety issues, and updatesCargo.lockto resolve related build conflicts.