#1331·sanitizers

With ASAN enabled on Linux ARM, the tests completion takes much more time.

Author: bryce-shangCreated Oct 12, 2020Updated Feb 18, 2026

With ASAN enabled, BoringSSL blackbox tests are 15 times slower on Linux ARM.

Notes

Hello, below description is very coupled to BoringSSL. If this reproduce step is not specific or needs additional narrow down, would someone provide some suggestions on the investigation/narrow down direction?

Below are the enabled ASAN flags.

  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -fsanitize-address-use-after-scope -fno-omit-frame-pointer")
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fsanitize-address-use-after-scope -fno-omit-frame-pointer")

Issue

With ASAN enabled, BoringSSL blackbox tests takes at least 30 minutes to complete 5k test cases on Linux ARM.

  • blackbox tests refer to run go test under ssl/test/runner.
  • the blackbox tests takes less than 2 minutes on other test dimensions -- X86 without ASAN, X86 with ASAN, ARM without ASAN.
OS & Arch Time to complete blackbox tests ASAN enabled
Ubuntu 20.04 X86 < 2 min No
Ubuntu 20.04 X86 < 2 min Yes
Ubuntu 20.04 ARM < 2 min No
Ubuntu 20.04 ARM > 30 min Yes

Expected Behavior

With ASAN enabled, BoringSSL blackbox tests should finish within 2 minutes on Linux ARM.

Reproduce steps on Ubuntu 20.04 ARM

Install tools

bash
set -ex && \
apt-get update && \
apt-get -y --no-install-recommends upgrade && \
apt-get -y --no-install-recommends install \
clang \
pkg-config \
libunwind-dev \
cmake \
ninja-build \
perl \
quilt \
ca-certificates \
wget && \
cd /tmp && \
wget https://dl.google.com/go/go1.13.12.linux-arm64.tar.gz && \
tar -xvf go1.13.12.linux-arm64.tar.gz && \
mv go /usr/local

export CC=clang
export CXX=clang++
export GOROOT=/usr/local/go
export PATH="$GOROOT/bin:$PATH"
export DEPENDENCIES_DIR=/home/dependencies
export LLVM_PROJECT_HOME=${DEPENDENCIES_DIR}/llvm-project

apt-get -y --no-install-recommends install \
llvm \
llvm-dev \
lld \
git \
quilt \
ca-certificates && \
mkdir -p ${DEPENDENCIES_DIR} && \
cd ${DEPENDENCIES_DIR} && \
git clone https://github.com/llvm/llvm-project.git --branch llvmorg-8.0.1  --depth 1 

Run tests

bash
git clone https://github.com/google/boringssl.git
cd boringssl && \
mkdir -p build && \
cd build && \
cmake -GNinja -DASAN=1 -DCMAKE_BUILD_TYPE=Release .. && \
ninja && \
# https://github.com/google/boringssl/blob/master/BUILDING.md
cd ../ssl/test/runner && \
go test