Closed
Description
Building for x86_64-apple-ios-macabi
with ASAN enabled produces this error:
FAILED: local_rustc_sysroot/lib/rustlib/x86_64-apple-ios-macabi/lib/libcore.rlib
"python3" "../../build/rust/rustc_wrapper.py" --rustc=../../third_party/rust-toolchain/bin/rustc --depfile=local_rustc_sysroot/lib/rustlib/x86_64-apple-ios-macabi/lib/libcore.rlib.d --rsp=local_rustc_sysroot/lib/rustlib/x86_64-apple-ios-macabi/lib/libcore.rlib.rsp -- -Clinker="../../third_party/llvm-build/Release+Asserts/bin/clang++" --crate-name core ../../third_party/rust-toolchain/lib/rustlib/src/rust/library/core/src/lib.rs --crate-type rlib -Zforce-unstable-if-unmarked --edition=2021 -Coverflow-checks=on -Cdefault-linker-libraries -Zdep-info-omit-d-target -Zmacro-backtrace -Zremap-cwd-prefix=. --color=always --target=x86_64-apple-ios-macabi -Cembed-bitcode=no -Cpanic=abort -Zpanic_abort_tests --cfg cr_rustc_revision=\"006a26c0b546abc0fbef59a773639582b641e500-6-llvmorg-17-init-16420-g0c545a44\" -Zdwarf-version=4 -Cdebuginfo=1 -Zsanitizer=address --cap-lints=allow -Dunsafe_op_in_unsafe_fn --sysroot=local_rustc_sysroot --emit=dep-info=local_rustc_sysroot/lib/rustlib/x86_64-apple-ios-macabi/lib/libcore.rlib.d,link -o local_rustc_sysroot/lib/rustlib/x86_64-apple-ios-macabi/lib/libcore.rlib LDFLAGS RUSTENV OUT_DIR=../../../../../../../../../out/Debug/gen/build/rust/std/rules/core CARGO_PKG_VERSION=0.0.0 CARGO_PKG_NAME=core CARGO_PKG_DESCRIPTION=The\ Rust\ Core\ Library
error: address sanitizer is not supported for this target
The aarch64-apple-ios-macabi
target gives the same compiler error.
Catalyst is a useful ABI for ASAN support because Chromium's iOS code is fuzzed on Catalyst, and ASAN is important to find bugs with fuzzers. This prevents us from having Rust code that is visible to Chrome's IOS product at all, or requires us to disable ASAN in the fuzzers.
Chromium issue: https://bugs.chromium.org/p/chromium/issues/detail?id=1466967
For someone coming in without background in Rust's sanitizer support, what would be needed to bring up ASAN support for this ABI? Consider that we don't need a runtime from the stdlib at all, as we're using Clang's ASAN runtime.